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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc8
mov edi, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edi
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [esp + 0x38], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov esi, 6
test eax, eax
js 0x404bef
mov esi, eax
mov dword [esp + 0xc], edi
mov eax, edi
mov dword [esp + 0x18], ecx
or eax, ecx
je 0x404c0b
mov edi, esi
and edi, 0x400
mov ax, 8
jmp 0x404c25
cmp dword [ebp + 0x14], 0
setne al
mov edi, esi
and edi, 0x400
sete cl
and cl, al
movzx eax, cl
shl eax, 3
test esi, 0x10000
mov dword [esp + 8], edx
jne 0x404c39
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x8c], eax
and esi, 0xf
sete ah
test edi, edi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 4], ecx
test ecx, ecx
je 0x404ed0
cmp dword [ebx + 0x14], 2
jne 0x404ed0
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x404ed0
or dl, cl
je 0x404ed0
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x404ed0
cmp esi, 0xb
jae 0x404ed0
mov edx, dword [esp + 4]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x404cc7
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x404ce1
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x404ed9
cmp dword [esp + 0x18], 0
jne 0x404cd8
mov bl, 1
cmp ecx, 0xffff
jne 0x404ce1
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 0xc]
or ecx, dword [esp + 0x18]
je 0x404cfe
test edi, edi
jne 0x404cfe
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x404ed7
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x404d82
test edi, edi
je 0x404d1b
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
mov byte [esp + 0x24], 1
jmp 0x404d70
or ah, al
mov byte [esp + 0xc], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00402b70
add esp, 0xc
mov dword [esp + 0x90], eax
mov dword [esp + 0x18], 0
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
mov eax, 0
cmp ecx, 4
setb cl
jb 0x404d5f
mov eax, esi
or cl, byte [esp + 0xc]
mov byte [esp + 0x24], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0xc], ecx
mov esi, eax
push dword [ebp + 0xc]
call fcn.00408100
add esp, 4
cmp eax, 0x10000
jb 0x404d91
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x404ed7
mov dword [esp + 0x20], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x4c], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov dword [esp + 0x10], 0
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x404dc4
lea edx, [eax - 1]
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 4]
mov ecx, dword [eax + 4]
xor edx, edx
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
add eax, ecx
setb dl
add eax, 0x4a
adc edx, 0
mov ecx, eax
and ecx, dword [esp + 0x4c]
add ecx, ecx
xor eax, dword [esp + 0x4c]
add eax, ecx
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
sbb dword [esp + 0x10], edx
jae 0x404e11
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x404ed7
test bl, bl
je 0x404e7d
mov eax, dword [esp + 0x20]
shr eax, 0x1f
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x4c]
add ebx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ebx, dword [ebp + 0x40]
adc edx, 0
mov ecx, dword [esp + 0x20]
add ecx, ecx
add ebx, ecx
adc edx, eax
add ebx, dword [esp + 0x2c]
adc edx, 0
add ebx, dword [esp + 0x14]
adc edx, 0
mov eax, dword [ebp + 8]
add ebx, dword [eax]
adc edx, dword [eax + 4]
add ebx, 0x72
adc edx, 0
cmp edx, 0xffffffff
mov edx, dword [esp + 0x20]
je 0x404e89
mov eax, dword [esp + 4]
mov dword [eax + 0x34], 1
mov dword [esp + 0x10], 0x1c
jmp 0x404e89
mov dword [esp + 0x10], 0x1c
mov edx, dword [esp + 0x20]
mov dword [esp + 0xa0], 0
test edx, edx
je 0x404ee3
mov eax, edx
xor eax, 1
mov ecx, edx
and ecx, 0xfffe
add ecx, ecx
sub ecx, eax
mov eax, dword [ebp + 0xc]
cmp byte [eax + ecx], 0x2f
mov ebx, dword [ebp + 8]
jne 0x404ee6
cmp dword [ebp + 0x14], 0
jne 0x404ed0
mov dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0xc]
or eax, dword [esp + 0x18]
je 0x404ee6
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 ebx, dword [ebp + 8]
mov eax, dword [esp + 0x4c]
add eax, edx
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x10]
add eax, ecx
add eax, 0x2e
mov ecx, dword [esp + 4]
cmp dword [ecx + 8], eax
jae 0x404f1d
push 1
push eax
push ecx
push ebx
call fcn.00407e70
mov ecx, dword [esp + 0x14]
add esp, 0x10
test eax, eax
je 0x40505d
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x404f3e
add ecx, 0x10
push 1
push eax
push ecx
push ebx
call fcn.00407e70
add esp, 0x10
test eax, eax
je 0x40505d
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x24]
jne 0x404f65
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x40505d
mov dword [esp + 0x10], eax
mov ecx, ebx
mov edx, dword [esp + 8]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.00405770
add esp, 8
test eax, eax
je 0x405069
test edi, edi
setne byte [esp + 0x14]
mov ecx, dword [esp + 8]
mov edi, ecx
mov ebx, dword [esp + 0x2c]
add edi, ebx
mov edx, dword [esp + 0x28]
adc edx, 0
mov eax, ecx
and eax, ebx
xor ecx, ebx
mov ebx, eax
shr ebx, 0x1f
add eax, eax
add ecx, eax
mov dword [esp + 8], ecx
mov eax, edx
mov ecx, edi
adc ebx, dword [esp + 0x28]
mov edi, ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov word [esp + 0x88], 0
movzx ebx, byte [esp + 0x24]
xor bl, 1
or bl, byte [esp + 0x14]
movzx edx, bl
shl edx, 3
mov dword [esp + 0x28], edx
mov edx, dword [esp + 4]
cmp dword [edx + 0x34], 0
je 0x40507b
mov dword [esp + 4], edi
mov dword [esp + 0x14], 0
mov edi, 0xfffffffe
cmp edi, dword [esp + 0xc]
mov edx, 0
sbb edx, dword [esp + 0x18]
jb 0x40508e
xor edx, edx
cmp edi, ecx
sbb edx, eax
jb 0x40508e
xor edi, edi
jmp 0x4051d9
mov dword [ebx + 0x1c], 0x10
jmp 0x404ed7
push dword [esp + 0x10]
push dword [ebx + 0x34]
call dword [ebx + 0x2c]
add esp, 8
jmp 0x404ed7
test edi, edi
je 0x4050a8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x404ed7
xor edx, edx
cmp edi, ecx
mov ecx, eax
mov eax, 0
sbb eax, ecx
jb 0x40518d
xor eax, eax
jmp 0x405191
mov dword [esp + 0x6c], 0x4034b50
test bl, bl
je 0x4050b6
mov bl, 0x14
mov byte [esp + 0x70], bl
mov ebx, dword [esp + 0x8c]
movzx edx, bx
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], dh
mov edx, dword [esp + 0x28]
mov byte [esp + 0x74], dl
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
mov edx, dword [esp + 0x20]
mov byte [esp + 0x86], dl
mov byte [esp + 0x87], dh
mov edx, dword [ebp + 0x38]
mov byte [esp + 0x88], dl
mov byte [esp + 0x89], dh
lea edx, [esp + 0x6c]
push 0x1e
push edx
push eax
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405370
mov ecx, dword [esp + 8]
add ecx, 0x1e
adc edi, 0
mov eax, ebx
mov ebx, dword [esp + 0x20]
push ebx
push dword [ebp + 0xc]
push edi
mov dword [esp + 0x14], ecx
push ecx
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40537c
mov ecx, dword [esp + 8]
add ecx, ebx
adc edi, 0
mov dword [esp + 4], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
jmp 0x4052fb
lea eax, [esp + 0x38]
mov edi, dword [esp + 0x18]
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0xc]
mov ecx, 0
sbb ecx, edi
jb 0x4051ae
mov ecx, 0
jmp 0x4051b2
lea ecx, [esp + 0x30]
jae 0x4051b8
lea edx, [esp + 0x40]
lea edi, [esp + 0xa8]
push eax
push ecx
push edx
mov dword [esp + 0x20], edi
push edi
call fcn.00405820
add esp, 0x10
mov edi, eax
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov edx, dword [ebp + 0x38]
add edx, edi
mov dword [esp + 0x6c], 0x4034b50
test bl, bl
je 0x4051ec
mov bl, 0x14
mov byte [esp + 0x70], bl
mov byte [esp + 0x71], 0
movzx ebx, word [esp + 0x8c]
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], bh
mov ebx, dword [esp + 0x28]
mov byte [esp + 0x74], bl
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
mov ebx, dword [esp + 0x20]
mov byte [esp + 0x86], bl
mov byte [esp + 0x87], bh
mov byte [esp + 0x88], dl
mov byte [esp + 0x89], dh
lea edx, [esp + 0x6c]
push 0x1e
push edx
push eax
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405370
mov dword [esp + 0x18], edi
mov edi, dword [esp + 8]
add edi, 0x1e
mov eax, dword [esp + 4]
adc eax, 0
mov ecx, ebx
mov ebx, dword [esp + 0x20]
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
push edi
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40537c
add edi, ebx
mov edx, dword [esp + 4]
adc edx, 0
cmp dword [esp + 0x14], 0
mov ecx, edi
mov dword [esp + 4], edx
je 0x4052f3
lea eax, [esp + 0xa8]
mov edi, dword [esp + 0x18]
push edi
push eax
push edx
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
mov dword [esp + 0x1c], ecx
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x405370
mov ecx, dword [esp + 8]
add ecx, edi
adc dword [esp + 4], 0
jmp 0x4052fb
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 8], ecx
je 0x40532e
push eax
push dword [ebp + 0x34]
mov edi, dword [esp + 0xc]
push edi
push ecx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
mov ecx, dword [ebp + 0x38]
add esp, 0x14
cmp eax, ecx
jne 0x405370
add dword [esp + 8], ecx
adc edi, 0
mov dword [esp + 4], edi
cmp byte [esp + 0x24], 0
je 0x405398
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 0x40537c
mov ecx, esi
add dword [esp + 8], esi
adc dword [esp + 4], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
jmp 0x405449
mov dword [ebx + 0x1c], 0x13
jmp 0x404ed7
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x404ed7
cmp dword [ebp + 0x14], 0
je 0x405449
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
xor eax, eax
cmp esi, 4
setb al
shl eax, 0xe
or eax, dword [esi*4 + 0x43f84c]
test esi, esi
jne 0x4053e4
or eax, 0x80000
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x4058a0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00404050
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xa4], eax
lea eax, [esp + 0xa4]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.00402c20
add esp, 0x18
cmp eax, 1
jne 0x405558
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
push dword [esp + 0x10]
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 edi, eax
mov dword [esp + 0xc], ecx
or eax, ecx
je 0x405549
mov dword [esp + 0x50], 0x8074b50
mov ecx, dword [esp + 0x90]
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x56], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x57], al
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x14], 0
je 0x405574
mov byte [esp + 0x58], bl
mov byte [esp + 0x59], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x5b], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x5c], cl
mov byte [esp + 0x5d], ch
mov byte [esp + 0x5e], al
mov byte [esp + 0x5f], bl
mov ecx, edi
mov byte [esp + 0x60], cl
mov byte [esp + 0x61], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x62], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x63], al
mov dword [esp + 0x2c], 0x38
mov dword [esp + 0x98], 0x30
mov ecx, 0x28
mov dword [esp + 0x24], 0x18
mov dword [esp + 0x10], 0x17
mov eax, dword [esp + 0xc]
mov byte [esp + 0x1f], al
mov dword [esp + 0x9c], 0x16
mov dword [esp + 0x94], 0x15
mov esi, 0x14
jmp 0x4055c9
mov dword [esp + 0xc], 0
xor ecx, ecx
jmp 0x405672
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x404ed7
test ecx, ecx
jne 0x40507f
mov dword [esp + 0x58], ebx
mov dword [esp + 0x2c], 0x18
mov dword [esp + 0x98], 0x10
mov ecx, 8
mov dword [esp + 0x10], 0xf
mov dword [esp + 0x9c], 0xe
mov eax, edi
mov byte [esp + 0x1f], al
mov dword [esp + 0x94], 0xd
mov esi, 0xc
mov dword [esp + 0x24], 0x10
mov ebx, edi
mov eax, dword [esp + 0xc]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1f]
mov byte [esp + esi + 0x50], dl
test cl, 0x20
jne 0x4055e4
mov eax, ebx
mov ebx, edi
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0xc]
shrd ebx, edx, cl
mov esi, dword [esp + 0x94]
mov byte [esp + esi + 0x50], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x40560a
mov eax, ebx
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0xc]
shrd edi, edx, cl
mov esi, edi
mov edi, dword [esp + 0x9c]
mov byte [esp + edi + 0x50], al
shr edx, cl
test cl, 0x20
jne 0x40562b
mov edx, esi
mov eax, dword [esp + 0x10]
mov byte [esp + eax + 0x50], dl
lea eax, [esp + 0x50]
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 0x404ed7
mov eax, dword [esp + 0x24]
add dword [esp + 8], eax
adc dword [esp + 4], 0
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x44]
mov edi, dword [ebp + 0x3c]
cmp dword [esp + 0x14], 0
je 0x4056e0
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x38]
mov eax, 0
sbb eax, dword [esp + 0x3c]
jb 0x405696
xor ebx, ebx
jmp 0x40569a
lea ebx, [esp + 0x38]
mov eax, 0xfffffffe
cmp eax, dword [esp + 0xc]
mov eax, 0
sbb eax, ecx
jb 0x4056b3
mov eax, 0
jmp 0x4056b7
lea eax, [esp + 0x30]
jae 0x4056bd
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa8]
push ebx
push eax
push edx
push ecx
call fcn.00405820
add esp, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x44]
movzx esi, word [esp + 0x8c]
movzx eax, word [esp + 0x28]
movzx edx, word [esp + 0x18]
movzx ebx, word [esp + 0x20]
push dword [ebp + 0x40]
push edi
push dword [esp + 0xa8]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push esi
push eax
push dword [esp + 0xb4]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push dword [esp + 0x40]
push dword [esp + 0x84]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x58]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00405910
add esp, 0x54
test eax, eax
je 0x404ed7
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 0x404ed9