Function at 0x404c60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc0
mov edi, dword [ebp + 0x24]
mov edx, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], edi
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 8], eax
mov dword [esp + 0x38], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov esi, 6
test eax, eax
js 0x404cb3
mov esi, eax
mov eax, edi
mov dword [esp + 0x18], edx
or eax, edx
jne 0x404cce
xor edx, edx
cmp dword [ebp + 0x14], 0
je 0x404cd2
mov eax, esi
and eax, 0x400
jne 0x404cd2
mov dx, 8
mov eax, esi
xor eax, 0xfffeffff
mov ecx, esi
or ecx, 0x10000
test ecx, eax
jne 0x404cee
movzx edx, dx
or edx, 0x800
mov dword [esp + 0x84], edx
mov eax, esi
and eax, 0xf
mov dword [esp + 0x20], eax
sete dh
mov eax, esi
xor eax, 0xfffffbff
or esi, 0x400
and esi, eax
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x404d7e
cmp dword [ebx + 0x14], 2
jne 0x404d7e
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x404d7e
or dl, cl
je 0x404d7e
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x404d7e
cmp dword [esp + 0x20], 0xb
jae 0x404d7e
mov byte [esp + 0x14], dh
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x404d91
xor ebx, ebx
cmp ecx, 0xffffffff
mov edx, dword [esp + 0x18]
jne 0x404db0
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x404d87
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x404da3
mov bl, 1
cmp ecx, 0xffff
jne 0x404db0
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x34], 1
xor ebx, ebx
mov ecx, edi
or ecx, edx
je 0x404dc6
test esi, esi
jne 0x404dc6
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x404d85
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x404e42
test esi, esi
je 0x404de3
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x88], eax
mov byte [esp + 0x24], 1
jmp 0x404e30
or byte [esp + 0x14], al
mov edi, dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push 0
call fcn.00402bb0
add esp, 0xc
mov dword [esp + 0x88], eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], 0
mov eax, 0
cmp edi, 4
setb cl
jb 0x404e1c
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], 0
or cl, byte [esp + 0x14]
mov byte [esp + 0x24], cl
mov dword [esp + 0x20], eax
push dword [ebp + 0xc]
call fcn.00408120
add esp, 4
cmp eax, 0x10000
jb 0x404e51
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x404d85
mov dword [esp + 0x14], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x8c], eax
mov dword [esp + 0xc], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
mov ecx, dword [edx + 0x24]
or ecx, eax
mov ecx, 0
je 0x404e8c
mov ecx, 0xfffffffe
add ecx, eax
inc ecx
mov edx, dword [edx]
and edx, ecx
sub eax, edx
and eax, ecx
mov ecx, eax
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
xor eax, eax
mov ecx, dword [esp + 0x14]
add ecx, dword [esp + 0x8c]
setb al
mov dword [esp + 0x80], edx
add ecx, edx
adc eax, 0
mov dword [esp + 0x28], ecx
mov edx, ecx
add edx, 0x4a
adc eax, 0
mov ecx, 0xfffffffe
cmp ecx, edx
sbb dword [esp + 0xc], eax
jae 0x404edb
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x404d85
mov ecx, dword [ebp + 0x38]
mov eax, 0x1c
test bl, bl
je 0x404f74
mov ebx, ecx
xor ecx, ecx
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x2c]
setb cl
mov edx, dword [ebp + 8]
add eax, dword [edx]
adc ecx, dword [edx + 4]
add eax, 0x1e
adc ecx, 0
lea edx, [eax + eax]
and edx, 0x5c
mov dword [esp + 0xc], edx
xor eax, 0x2e
xor edx, edx
add ebx, dword [esp + 0x8c]
setb dl
add ebx, dword [esp + 0x14]
adc edx, 0
add ebx, eax
adc edx, ecx
add ebx, dword [esp + 0xc]
adc edx, 0
mov eax, ebx
mov ecx, dword [esp + 0x80]
and eax, ecx
xor ebx, ecx
mov ecx, eax
shr ecx, 0x1f
add eax, eax
add ebx, dword [ebp + 0x40]
adc edx, 0xffffffff
add ebx, eax
adc edx, ecx
add ebx, 0x26
adc edx, 0
xor eax, eax
cmp edx, 0xffffffff
mov edx, dword [esp + 0x14]
je 0x404f78
mov eax, dword [esp + 0x10]
mov dword [eax + 0x34], 1
mov eax, 0x1c
jmp 0x404f78
mov edx, dword [esp + 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 0x80], 0
test edx, edx
je 0x404fbd
mov eax, dword [ebp + 0xc]
cmp byte [eax + edx - 1], 0x2f
mov ecx, dword [ebp + 8]
jne 0x404fc0
cmp dword [ebp + 0x14], 0
jne 0x404fb1
mov dword [esp + 0x80], 0x10
mov eax, edi
or eax, dword [esp + 0x18]
je 0x404fc0
mov dword [ecx + 0x1c], 0x18
jmp 0x404d85
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0xc]
add eax, edx
add eax, 0x2e
mov ebx, dword [esp + 0x10]
cmp dword [ebx + 8], eax
jae 0x404fee
push 1
push eax
push ebx
push ecx
call fcn.00407e80
mov ecx, dword [ebp + 8]
add esp, 0x10
test eax, eax
je 0x40512f
mov eax, dword [ebx + 0x14]
inc eax
cmp dword [ebx + 0x18], eax
jae 0x405013
lea edx, [ebx + 0x10]
push 1
push eax
push edx
push ecx
mov ebx, ecx
call fcn.00407e80
mov ecx, ebx
add esp, 0x10
test eax, eax
je 0x40512f
cmp dword [ebp + 0x14], 0
sete dl
xor eax, eax
or dl, byte [esp + 0x24]
jne 0x40503e
push 0x4df40
push 1
push dword [ecx + 0x34]
mov ebx, ecx
call dword [ecx + 0x28]
mov ecx, ebx
add esp, 0xc
test eax, eax
je 0x40512f
mov dword [esp + 0xc], eax
mov edx, dword [esp + 8]
push dword [esp + 0x2c]
mov ebx, dword [esp + 8]
push ebx
call fcn.00405820
add esp, 8
test eax, eax
je 0x40513b
test esi, esi
setne al
mov edx, dword [esp + 8]
add edx, dword [esp + 0x2c]
adc ebx, 0
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov word [esp + 0x7c], 0
movzx ecx, byte [esp + 0x24]
xor cl, 1
or cl, al
mov byte [esp + 0x28], cl
movzx eax, cl
shl eax, 3
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
mov esi, ebx
je 0x405150
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, edi
mov ecx, 0
sbb ecx, dword [esp + 0x18]
mov ebx, edx
jb 0x40510d
xor ecx, ecx
mov edx, 0xfffffffe
cmp edx, ebx
sbb ecx, esi
mov edx, ebx
mov ecx, esi
mov dword [esp + 0x10], 0
jae 0x405286
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, ebx
mov ecx, 0
sbb ecx, esi
mov edx, 0xfffffffe
jb 0x405245
xor ecx, ecx
jmp 0x405249
mov dword [ecx + 0x1c], 0x10
jmp 0x404d85
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x404d85
test esi, esi
mov ecx, dword [esp + 0x84]
je 0x40516a
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x404d85
mov dword [esp + 0x60], 0x4034b50
movzx eax, byte [esp + 0x28]
test al, al
je 0x40517d
mov al, 0x14
mov byte [esp + 0x64], al
movzx eax, cx
mov byte [esp + 0x66], cl
mov byte [esp + 0x67], ah
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], al
mov dword [esp + 0x69], 0
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov byte [esp + 0x79], 0
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x7c], al
mov byte [esp + 0x7d], ah
lea eax, [esp + 0x60]
push 0x1e
push eax
push esi
push edx
mov edi, edx
mov dword [esp + 0x14], esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40560b
add edi, 0x1e
mov eax, dword [esp + 4]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
push edi
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x4055fe
mov eax, edi
and eax, ebx
mov ecx, eax
shr ecx, 0x1f
add eax, eax
xor edi, ebx
add edi, eax
mov dword [esp + 8], edi
adc dword [esp + 4], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
jmp 0x405399
lea ecx, [esp + 0x38]
cmp edx, edi
mov edx, 0
sbb edx, dword [esp + 0x18]
jb 0x40525d
mov edx, 0
jmp 0x405261
lea edx, [esp + 0x30]
jae 0x405267
lea eax, [esp + 0x40]
lea edi, [esp + 0xa0]
push ecx
push edx
push eax
mov dword [esp + 0x1c], edi
push edi
call fcn.004058c0
add esp, 0x10
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edi, edx
mov dword [esp + 4], esi
mov dword [esp + 8], ebx
mov dword [esp + 0x18], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x60], 0x4034b50
movzx eax, byte [esp + 0x28]
test al, al
je 0x4052ac
mov al, 0x14
mov byte [esp + 0x64], al
mov byte [esp + 0x65], 0
movzx ebx, word [esp + 0x84]
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], bh
mov ebx, dword [esp + 0x2c]
mov byte [esp + 0x68], bl
mov dword [esp + 0x69], 0
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov byte [esp + 0x79], 0
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov byte [esp + 0x7c], dl
mov byte [esp + 0x7d], dh
lea edx, [esp + 0x60]
push 0x1e
push edx
push ecx
push edi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40560b
mov edi, dword [esp + 8]
add edi, 0x1e
mov eax, esi
mov esi, dword [esp + 4]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
push edi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x405422
add edi, ebx
adc esi, 0
cmp dword [esp + 0x10], 0
je 0x405389
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x18]
push ebx
push eax
push esi
push edi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x4055e3
add edi, ebx
mov dword [esp + 8], edi
adc esi, 0
mov dword [esp + 4], esi
jmp 0x405399
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x4053d0
push eax
push dword [ebp + 0x34]
push dword [esp + 0xc]
mov edi, dword [esp + 0x14]
push edi
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
mov esi, eax
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4055f2
mov eax, esi
add edi, esi
mov dword [esp + 8], edi
adc dword [esp + 4], 0
cmp byte [esp + 0x24], 0
je 0x40542e
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0xc]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405422
mov edx, dword [esp + 8]
mov eax, edx
and eax, esi
mov ecx, eax
shr ecx, 0x1f
add eax, eax
xor edx, esi
add edx, eax
mov dword [esp + 8], edx
adc dword [esp + 4], ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
jmp 0x4054e3
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
jmp 0x405602
cmp dword [ebp + 0x14], 0
je 0x4054e3
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
mov ecx, dword [esp + 0x20]
cmp ecx, 4
setb al
shl eax, 0xe
or eax, dword [ecx*4 + 0x43d84c]
test ecx, ecx
jne 0x40547e
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x405930
mov esi, dword [esp + 0x18]
push esi
call fcn.00404110
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x9c]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.00402d00
add esp, 0x18
cmp eax, 1
jne 0x405620
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov esi, eax
mov dword [esp + 0x20], ecx
or eax, ecx
je 0x405617
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x88]
mov byte [esp + 0x4c], cl
mov byte [esp + 0x4d], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x4e], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x4f], al
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x10], 0
je 0x40563c
mov byte [esp + 0x50], bl
mov byte [esp + 0x51], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x52], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x53], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov byte [esp + 0x56], al
mov byte [esp + 0x57], bl
mov ecx, esi
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, esi
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, esi
shr eax, 0x18
mov byte [esp + 0x5b], al
mov dword [esp + 0x28], 0x38
mov dword [esp + 0x94], 0x30
mov ecx, 0x28
mov dword [esp + 0x24], 0x18
mov dword [esp + 0xc], 0x17
mov eax, dword [esp + 0x20]
mov byte [esp + 0x1f], al
mov dword [esp + 0x98], 0x16
mov dword [esp + 0x90], 0x15
mov edi, 0x14
jmp 0x405691
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x404d85
mov dword [ebx + 0x1c], 0x13
jmp 0x404d85
push dword [esp + 0xc]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x404d85
xor eax, eax
xor ecx, ecx
jmp 0x405734
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x404d85
test ecx, ecx
jne 0x40515b
mov dword [esp + 0x50], ebx
mov dword [esp + 0x28], 0x18
mov dword [esp + 0x94], 0x10
mov ecx, 8
mov dword [esp + 0xc], 0xf
mov dword [esp + 0x98], 0xe
mov eax, esi
mov byte [esp + 0x1f], al
mov dword [esp + 0x90], 0xd
mov edi, 0xc
mov dword [esp + 0x24], 0x10
mov ebx, esi
mov eax, dword [esp + 0x20]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1f]
mov byte [esp + edi + 0x48], dl
test cl, 0x20
jne 0x4056ac
mov eax, ebx
mov ebx, esi
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x20]
shrd ebx, edx, cl
mov edi, dword [esp + 0x90]
mov byte [esp + edi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x4056d2
mov eax, ebx
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
shrd esi, edx, cl
mov edi, dword [esp + 0x98]
mov byte [esp + edi + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x4056f1
mov edx, esi
mov eax, dword [esp + 0xc]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x24]
push esi
push eax
push dword [esp + 0xc]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x404d85
mov eax, dword [esp + 0x24]
add dword [esp + 8], eax
adc dword [esp + 4], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x10], 0
je 0x405799
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x38]
mov esi, 0
sbb esi, dword [esp + 0x3c]
jb 0x405755
xor edi, edi
jmp 0x405759
lea edi, [esp + 0x38]
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x405770
mov eax, 0
jmp 0x405774
lea eax, [esp + 0x30]
jae 0x40577a
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
push edi
push eax
push edx
push ecx
call fcn.004058c0
add esp, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
movzx ebx, word [esp + 0x84]
movzx esi, word [esp + 0x2c]
movzx edx, word [esp + 0x18]
movzx edi, word [esp + 0x14]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x88]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push ebx
push esi
push dword [esp + 0xac]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push eax
push dword [esp + 0xc4]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x54]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00405980
add esp, 0x54
test eax, eax
je 0x404d85
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax], ecx
mov ecx, dword [esp + 4]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x404d87