Function at 0x404c30
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 esi, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], edi
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 4], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov ecx, dword [ebp + 0x20]
mov eax, 6
test ecx, ecx
js 0x404c7f
mov eax, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
mov ecx, edi
or ecx, esi
je 0x404c9b
mov edi, eax
and edi, 0x400
mov cx, 8
jmp 0x404cb5
cmp dword [ebp + 0x14], 0
setne cl
mov edi, eax
and edi, 0x400
sete dl
and dl, cl
movzx ecx, dl
shl ecx, 3
test eax, 0x10000
mov dword [esp + 0x18], esi
jne 0x404cc9
movzx ecx, cx
or ecx, 0x800
mov dword [esp + 0x88], ecx
mov esi, eax
not esi
or esi, 0xf
add esi, eax
inc esi
sete al
test edi, edi
setne ah
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x404d43
cmp dword [ebx + 0x14], 2
jne 0x404d43
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x404d43
or dl, cl
je 0x404d43
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x404d43
cmp esi, 0xb
jae 0x404d43
mov edx, dword [esp + 0x10]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x404d56
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x404d70
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x404d4c
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esp + 0x18], 0
jne 0x404d67
mov bl, 1
cmp ecx, 0xffff
jne 0x404d70
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 8]
or ecx, dword [esp + 0x18]
je 0x404d8a
test edi, edi
jne 0x404d8a
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x404d4a
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x404e0e
test edi, edi
je 0x404da7
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x8c], eax
mov byte [esp + 0x28], 1
jmp 0x404dfc
or ah, al
mov byte [esp + 8], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00402ba0
add esp, 0xc
mov dword [esp + 0x8c], 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 0x404deb
mov eax, esi
or cl, byte [esp + 8]
mov byte [esp + 0x28], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 8], ecx
mov esi, eax
push dword [ebp + 0xc]
call fcn.004081d0
add esp, 4
cmp eax, 0x10000
jb 0x404e1d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x404d4a
mov dword [esp + 0x24], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x84], eax
mov dword [esp + 0x14], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x404e58
mov edx, 0xfffffffe
add edx, eax
inc edx
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 4]
xor edx, edx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
add eax, ecx
setb dl
add eax, 0x2e
adc edx, 0
lea ecx, [eax + eax]
and ecx, 0x38
xor eax, 0x1c
add eax, dword [esp + 0x84]
adc edx, 0
add eax, ecx
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
sbb dword [esp + 0x14], edx
jae 0x404eac
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x404d4a
mov edx, 0x1c
test bl, bl
je 0x404f27
mov ecx, dword [esp + 0x24]
mov eax, ecx
shr eax, 0x1f
lea ebx, [ecx + ecx]
xor ecx, ecx
mov edx, dword [esp + 0x84]
add edx, dword [ebp + 0x38]
setb cl
add edx, ebx
adc ecx, eax
add edx, dword [esp + 0x20]
adc ecx, 0
add edx, dword [esp + 0x2c]
adc ecx, 0
mov ebx, dword [ebp + 8]
add edx, dword [ebx]
adc ecx, dword [ebx + 4]
add edx, 0x4c
adc ecx, 0
lea eax, [edx + edx]
and eax, 0x2c
xor edx, 0x16
add edx, dword [ebp + 0x40]
adc ecx, 0xffffffff
add edx, eax
adc ecx, 0
add edx, 0x10
adc ecx, 0
xor edx, edx
cmp ecx, 0xffffffff
mov ecx, dword [esp + 0x24]
je 0x404f2b
mov eax, dword [esp + 0x10]
mov dword [eax + 0x34], 1
mov edx, 0x1c
jmp 0x404f2b
mov ecx, dword [esp + 0x24]
xor ebx, ebx
test ecx, ecx
je 0x404f58
mov eax, dword [ebp + 0xc]
cmp byte [eax + ecx - 1], 0x2f
jne 0x404f58
cmp dword [ebp + 0x14], 0
jne 0x404d7e
mov ebx, 0x10
mov eax, dword [esp + 8]
or eax, dword [esp + 0x18]
jne 0x404d7e
mov eax, dword [esp + 0x84]
add eax, ecx
mov ecx, dword [esp + 0x2c]
add ecx, eax
lea eax, [edx + ecx]
add eax, 0x2e
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 8], eax
jae 0x404f91
push 1
push eax
push ecx
push dword [ebp + 8]
call fcn.00407e20
mov ecx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x4050de
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x404fb4
add ecx, 0x10
push 1
push eax
push ecx
push dword [ebp + 8]
call fcn.00407e20
add esp, 0x10
test eax, eax
je 0x4050de
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x28]
mov ecx, dword [ebp + 8]
jne 0x404fe4
push 0x4df40
push 1
push dword [ecx + 0x34]
mov eax, dword [ebp + 8]
call dword [eax + 0x28]
mov ecx, dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x40511c
mov dword [esp + 0x14], eax
mov dword [esp + 0xa0], ebx
mov edx, dword [esp + 4]
push dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
push ebx
call fcn.004057f0
add esp, 8
test eax, eax
je 0x4050ed
test edi, edi
setne al
mov edx, dword [esp + 4]
add edx, dword [esp + 0x20]
adc ebx, 0
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ebx
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 dword [esp + 0x7c], 0
mov word [esp + 0x80], 0
movzx ecx, byte [esp + 0x28]
xor cl, 1
or cl, al
mov byte [esp + 0x20], cl
movzx eax, cl
shl eax, 3
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
mov edi, ebx
je 0x405102
xor ebx, ebx
mov eax, 0xfffffffe
cmp eax, dword [esp + 8]
mov eax, 0
sbb eax, dword [esp + 0x18]
mov dword [esp + 4], edx
jb 0x4050c1
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, edx
sbb eax, edi
mov eax, edx
mov ecx, edi
mov dword [esp + 0x10], 0
jae 0x405250
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, edx
mov ecx, 0
sbb ecx, edi
jb 0x405206
xor ecx, ecx
jmp 0x40520a
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x404d4a
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x404d4a
test edi, edi
mov ecx, dword [esp + 0x88]
je 0x405128
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x404d4a
mov dword [ecx + 0x1c], 0x10
jmp 0x404d4a
mov dword [esp + 0x64], 0x4034b50
movzx eax, byte [esp + 0x20]
test al, al
je 0x40513b
mov al, 0x14
mov byte [esp + 0x68], al
movzx eax, cx
mov byte [esp + 0x6a], cl
mov byte [esp + 0x6b], ah
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x6c], al
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
mov eax, dword [esp + 0x24]
mov byte [esp + 0x7e], al
mov byte [esp + 0x7f], ah
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x80], al
mov byte [esp + 0x81], ah
lea eax, [esp + 0x64]
push 0x1e
push eax
push edi
push edx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
mov dword [esp + 0x18], edx
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40536a
mov eax, dword [esp + 4]
add eax, 0x1e
adc edi, 0
push dword [esp + 0x24]
push dword [ebp + 0xc]
push edi
mov dword [esp + 0x10], eax
push eax
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jne 0x40535d
mov eax, ecx
mov ecx, dword [esp + 4]
add ecx, eax
adc edi, 0
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
jmp 0x405382
lea ecx, [esp + 0x38]
mov edx, 0xfffffffe
cmp edx, dword [esp + 8]
mov edx, 0
sbb edx, dword [esp + 0x18]
jb 0x405225
mov edx, 0
jmp 0x405229
lea edx, [esp + 0x30]
jae 0x40522f
lea eax, [esp + 0x40]
lea ebx, [esp + 0xa8]
push ecx
push edx
push eax
mov dword [esp + 0x1c], ebx
push ebx
call fcn.004058a0
add esp, 0x10
mov ebx, eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], ebx
mov edx, dword [ebp + 0x38]
add edx, ebx
mov dword [esp + 0x64], 0x4034b50
movzx ebx, byte [esp + 0x20]
test bl, bl
je 0x405270
mov bl, 0x14
mov byte [esp + 0x68], bl
mov byte [esp + 0x69], 0
movzx ebx, word [esp + 0x88]
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bh
mov ebx, dword [esp + 0x2c]
mov byte [esp + 0x6c], bl
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x7e], bl
mov edi, ebx
mov byte [esp + 0x7f], bh
mov byte [esp + 0x80], dl
mov byte [esp + 0x81], dh
lea edx, [esp + 0x64]
push 0x1e
push edx
push ecx
push eax
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40536a
mov eax, dword [esp + 4]
add eax, 0x1e
mov ecx, dword [esp + 0xc]
adc ecx, 0
push edi
push dword [ebp + 0xc]
push ecx
push eax
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x40535d
mov eax, edi
mov edi, dword [esp + 0xc]
mov ecx, eax
add ecx, dword [esp + 4]
adc edi, 0
add ecx, 0x1e
adc edi, 0
cmp dword [esp + 0x10], 0
je 0x405376
lea eax, [esp + 0xa8]
push dword [esp + 0x18]
push eax
push edi
push ecx
push dword [ebx + 0x44]
mov dword [esp + 0x1c], ecx
call dword [ebx + 0x3c]
add esp, 0x14
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jne 0x40536a
mov eax, ecx
mov ecx, dword [esp + 8]
add ecx, eax
adc edi, 0
mov dword [esp + 0xc], edi
jmp 0x405382
push dword [esp + 0x14]
push dword [ebx + 0x34]
call dword [ebx + 0x2c]
add esp, 8
mov dword [ebx + 0x1c], 0x13
jmp 0x404d4a
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 8], ecx
je 0x4053ae
push eax
push dword [ebp + 0x34]
push dword [esp + 0x14]
push ecx
push dword [ebx + 0x44]
mov edi, eax
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x40536a
add dword [esp + 8], edi
adc dword [esp + 0xc], 0
cmp byte [esp + 0x28], 0
je 0x4053f5
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x14]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4055ac
mov eax, dword [ebp + 0x14]
add dword [esp + 8], eax
adc dword [esp + 0xc], 0
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 0
jmp 0x4054a6
cmp dword [ebp + 0x14], 0
je 0x4054a6
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
cmp esi, 4
setb al
shl eax, 0xe
or eax, dword [esi*4 + 0x43b84c]
test esi, esi
jne 0x405441
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x405920
mov esi, dword [esp + 0x20]
push esi
call fcn.004040e0
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.00402cd0
add esp, 0x18
cmp eax, 1
jne 0x4055d7
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 + 0xc], eax
push dword [esp + 0x14]
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 + 4], ecx
or eax, ecx
je 0x4055c8
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x8c]
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 0x4055f3
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, edi
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x5b], al
lea eax, [esp + 0x5c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x14], 0x38
mov dword [esp + 0x98], 0x30
mov ecx, 0x28
mov dword [esp + 0x28], 0x18
mov eax, dword [esp + 4]
mov byte [esp + 0x1f], al
mov dword [esp + 0x20], 0x17
mov dword [esp + 0x9c], 0x16
mov dword [esp + 0x90], 0x15
jmp 0x40564e
push dword [esp + 0x14]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x404d4a
mov dword [esp + 4], 0
xor ecx, ecx
jmp 0x4056fa
push dword [esp + 0x14]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x404d4a
test ecx, ecx
jne 0x40510d
mov dword [esp + 0x50], ebx
lea eax, [esp + 0x54]
mov dword [esp + 0x94], eax
mov dword [esp + 0x14], 0x18
mov dword [esp + 0x98], 0x10
mov ecx, 8
mov dword [esp + 0x20], 0xf
mov eax, edi
mov byte [esp + 0x1f], al
mov dword [esp + 0x9c], 0xe
mov dword [esp + 0x90], 0xd
mov dword [esp + 0x28], 0x10
mov ebx, edi
mov eax, dword [esp + 4]
shrd ebx, eax, cl
shr eax, cl
mov esi, dword [esp + 0x94]
movzx edx, byte [esp + 0x1f]
mov byte [esi], dl
test cl, 0x20
jne 0x40566e
mov eax, ebx
mov ebx, edi
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 4]
shrd ebx, edx, cl
mov esi, dword [esp + 0x90]
mov byte [esp + esi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x405694
mov eax, ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 4]
shrd edi, edx, cl
mov ebx, dword [esp + 0x9c]
mov byte [esp + ebx + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x4056b3
mov edx, edi
mov eax, dword [esp + 0x20]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x28]
push esi
push eax
push dword [esp + 0x14]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x404d4a
mov eax, dword [esp + 0x28]
add dword [esp + 8], eax
adc dword [esp + 0xc], 0
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x44]
mov edi, dword [ebp + 0x3c]
cmp dword [esp + 0x10], 0
je 0x405768
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x38]
mov eax, 0
sbb eax, dword [esp + 0x3c]
jb 0x40571e
xor ebx, ebx
jmp 0x405722
lea ebx, [esp + 0x38]
mov eax, 0xfffffffe
cmp eax, dword [esp + 4]
mov eax, 0
sbb eax, ecx
jb 0x40573b
mov eax, 0
jmp 0x40573f
lea eax, [esp + 0x30]
jae 0x405745
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa8]
push ebx
push eax
push edx
push ecx
call fcn.004058a0
add esp, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x44]
movzx esi, word [esp + 0x88]
movzx eax, word [esp + 0x2c]
movzx edx, word [esp + 0x18]
movzx ebx, word [esp + 0x24]
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 + 0xb0]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push dword [esp + 0x38]
push dword [esp + 0xbc]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x54]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00405970
add esp, 0x54
test eax, eax
je 0x404d4a
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax], ecx
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x404d4c