Function at 0x4059b8
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x48
mov edi, dword [esp + 0x5c]
xor eax, eax
lea ecx, [esp + 0x20]
mov byte [ecx + 4], al
mov dword [ecx], 0xe8
lea ecx, [esp + 0xc]
mov byte [ecx + 4], al
mov dword [ecx], 0xe9
lea ecx, [esp + 0x18]
mov word [ecx + 4], 0
mov dword [ecx], 0x800f
mov dword [edi + 0xc], eax
mov dword [esp], 0
mov dword [edi + 0x10], eax
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x14], eax
movzx esi, al
add esi, dword [edi]
mov dword [esp + 0x44], ebx
movzx ebp, bl
mov edi, dword [edi + 8]
add edi, ebp
lea eax, [esp + 0x28]
push eax
push esi
call fcn.004046d0
add esp, 8
test byte [esp + 0x41], 0x10
jne 0x405ce0
cmp byte [esp + 0x14], 5
jb 0x405a51
mov eax, esi
sub eax, edi
add eax, 0xfffffffb
mov dword [esp + 0xd], eax
mov eax, 5
mov cl, 1
mov dword [esp + 8], ecx
lea ecx, [esp + 0xc]
jmp 0x405a8c
movzx ecx, byte [esp + 0x2e]
cmp ecx, 0xe8
jne 0x405b03
movzx eax, byte [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov edx, esi
sub edx, edi
add edx, eax
lea eax, [ecx + edx]
add eax, 0xfffffffb
mov dword [esp + 0x21], eax
mov eax, 5
mov dword [esp + 8], 0
lea ecx, [esp + 0x20]
mov dword [esp + 4], ecx
cmp esi, dword [esp]
jae 0x405aa2
movzx edx, byte [esp + 0x28]
cmp eax, edx
jne 0x405ce0
lea ebx, [eax + ebp]
cmp ebx, 0x20
ja 0x405ce0
mov edx, dword [esp + 0x5c]
mov edx, dword [edx + 0x10]
cmp edx, 8
jae 0x405ce0
mov edi, dword [esp + 0x5c]
mov ecx, dword [esp + 0x14]
mov byte [edi + edx + 0x14], cl
mov esi, ebp
mov ebp, ecx
mov edx, dword [edi + 0x10]
mov ecx, dword [esp + 0x44]
mov byte [edi + edx + 0x1c], cl
inc dword [edi + 0x10]
add esi, dword [edi + 8]
push eax
push dword [esp + 8]
push esi
call sub.msvcrt.dll_memcpy
mov eax, ebp
add esp, 0xc
add al, byte [esp + 0x28]
cmp byte [esp + 8], 0
je 0x405a00
jmp 0x405c21
mov edx, ecx
and edx, 0xfffffffd
cmp edx, 0xe9
jne 0x405b22
movzx edx, byte [esp + 0x28]
add edx, esi
cmp cl, 0xeb
je 0x405b60
mov ecx, dword [esp + 0x38]
jmp 0x405b65
mov edx, ecx
and edx, 0xfffffff0
cmp edx, 0x70
sete dl
mov ebx, ecx
and ebx, 0xfffffffc
cmp ebx, 0xe0
sete bl
or bl, dl
jne 0x405b4f
mov dl, byte [esp + 0x2f]
and dl, 0xf0
cmp dl, 0x80
jne 0x405c00
movzx edx, byte [esp + 0x28]
add edx, esi
test bl, bl
jne 0x405b95
mov ebx, dword [esp + 0x38]
jmp 0x405b9a
movsx ecx, byte [esp + 0x38]
add edx, ecx
mov ecx, dword [esp + 0x5c]
mov ecx, dword [ecx]
cmp edx, ecx
jb 0x405b78
add ecx, 5
cmp edx, ecx
jb 0x405bad
sub edx, edi
add edx, 0xfffffffb
mov dword [esp + 0xd], edx
cmp esi, dword [esp]
setae al
mov dword [esp + 8], eax
mov eax, 5
jmp 0x405a4b
movsx ebx, byte [esp + 0x38]
add edx, ebx
mov ebx, dword [esp + 0x5c]
mov ebx, dword [ebx]
cmp edx, ebx
jb 0x405bc2
add ebx, 5
cmp edx, ebx
jae 0x405bc2
mov ecx, dword [esp]
cmp ecx, edx
cmovbe ecx, edx
mov dword [esp], ecx
mov dword [esp + 8], 0
jmp 0x405c18
mov eax, ecx
and al, 0xfc
cmp al, 0xe0
je 0x405ce0
cmp cl, 0xf
movzx eax, byte [esp + 0x2f]
cmovne eax, ecx
and al, 0xf
or al, 0x80
mov byte [esp + 0x19], al
sub edx, edi
add edx, 0xfffffffa
mov dword [esp + 0x1a], edx
mov eax, 6
mov dword [esp + 8], 0
lea ecx, [esp + 0x18]
jmp 0x405a8c
and ecx, 0xfffffffe
cmp ecx, 0xc2
sete cl
cmp esi, dword [esp]
setae dl
and dl, cl
mov dword [esp + 8], edx
mov dword [esp + 4], esi
jmp 0x405a90
xor esi, esi
inc esi
cmp al, 4
ja 0x405ce2
mov ebx, eax
movzx ecx, al
mov eax, dword [edi]
movzx edx, byte [eax + ecx]
test edx, edx
je 0x405c4b
cmp edx, 0xcc
je 0x405c4b
cmp edx, 0x90
jne 0x405c6b
mov edi, 5
sub edi, ecx
cmp edi, 2
jb 0x405ce2
mov edi, ecx
cmp byte [eax + edi + 1], dl
jne 0x405c6b
inc edi
cmp edi, 4
jne 0x405c5d
jmp 0x405ce2
cmp bl, 1
ja 0x405c9c
test edx, edx
je 0x405c84
cmp edx, 0xcc
je 0x405c84
cmp edx, 0x90
jne 0x405ce0
mov edi, 2
sub edi, ecx
cmp edi, 2
jb 0x405c9c
cmp byte [eax + ecx + 1], dl
jne 0x405ce0
inc ecx
cmp ecx, 1
jne 0x405c90
add eax, 0xfffffffb
push eax
call fcn.0040469f
add esp, 4
test eax, eax
je 0x405ce0
mov edi, dword [esp + 0x5c]
mov eax, dword [edi]
movzx ecx, byte [eax - 5]
test ecx, ecx
je 0x405cca
cmp ecx, 0xcc
je 0x405cca
cmp ecx, 0x90
jne 0x405ce0
mov edx, 0xfffffffc
cmp byte [eax + edx], cl
jne 0x405ce0
inc edx
jne 0x405ccf
mov dword [edi + 0xc], 1
jmp 0x405ce2
xor esi, esi
mov eax, esi
add esp, 0x48
pop esi
pop edi
pop ebx
pop ebp
ret