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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xd0
mov esi, dword [ebp + 0x24]
mov edi, dword [ebp + 0x28]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x20]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], esi
test ecx, ecx
mov eax, 6
cmovns eax, ecx
mov ecx, esi
mov dword [esp + 0x44], edi
or ecx, edi
mov ebx, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
je 0x4053a6
mov ecx, eax
and ecx, 0x400
jmp 0x4053ba
mov edi, eax
and edi, 0x400
xor ecx, ecx
cmp dword [ebp + 0x14], 0
je 0x4053c0
test edi, edi
jne 0x4053c0
mov edi, ecx
mov cx, 8
movzx ebx, cx
lea ecx, [ebx + 0x800]
test eax, 0x10000
cmove ebx, ecx
mov dword [esp + 0x7c], ebx
mov ecx, eax
and ecx, 0xf
mov dword [esp + 0x2c], ecx
sete bl
mov dword [esp + 0x40], edi
test edi, edi
setne cl
mov edi, dword [edx + 0x48]
test edi, edi
je 0x405498
cmp dword [edx + 0x14], 2
jne 0x405498
cmp dword [ebp + 0x14], 0
setne dl
cmp dword [ebp + 0x10], 0
sete ch
cmp dword [ebp + 0xc], 0
je 0x405498
and ch, dl
jne 0x405498
cmp word [ebp + 0x1c], 0
setne dl
cmp dword [ebp + 0x18], 0
sete ch
test ch, dl
jne 0x405498
cmp dword [esp + 0x2c], 0xb
jae 0x405498
mov dword [esp + 0x1c], edi
mov edi, dword [edi + 0x34]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x10]
mov dword [esp + 8], edi
test edi, edi
je 0x40545f
cmp edx, 0xffffffff
mov edi, dword [esp + 0x1c]
jne 0x405489
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x4054a2
cmp dword [esp + 0x44], 0
mov edi, dword [esp + 0x1c]
jne 0x40547a
mov dword [esp + 8], 0
cmp edx, 0xffff
jne 0x405489
mov dword [edi + 0x34], 1
mov dword [esp + 8], 1
mov edx, esi
or edx, dword [esp + 0x44]
je 0x4054ae
cmp dword [esp + 0x40], 0
jne 0x4054ae
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp + 0xc]
cmp byte [edx], 0x2f
mov edx, dword [ebp + 8]
jne 0x4054c2
mov dword [edx + 0x1c], 0x19
jmp 0x4054a2
or bl, cl
mov ecx, eax
xor ecx, 0xfffffbff
or eax, 0x400
test eax, ecx
je 0x4054e2
mov byte [esp + 0x20], bl
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x74], eax
jmp 0x405524
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push 0
call fcn.004032d0
add esp, 0xc
mov dword [esp + 0x74], eax
xor edx, edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], 0
cmp esi, 4
setb al
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x44], 0
cmovb ecx, edx
mov dword [esp + 0x2c], ecx
or bl, al
mov byte [esp + 0x20], bl
push dword [ebp + 0xc]
call fcn.00408a00
add esp, 4
cmp eax, 0x10000
jb 0x405545
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x4054a2
mov dword [esp + 0x28], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x78], eax
mov ebx, 0xfffffffe
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
mov ecx, dword [edx + 0x24]
or ecx, eax
mov ecx, 0
je 0x405575
add ebx, eax
inc ebx
mov ecx, dword [edx]
and ecx, ebx
sub eax, ecx
and eax, ebx
mov ecx, eax
mov dword [esp + 0x14], ecx
mov edx, dword [edi + 4]
xor ecx, ecx
mov eax, dword [esp + 0x78]
add eax, dword [esp + 0x28]
setb cl
mov dword [esp + 0x70], edx
add eax, edx
adc ecx, 0
mov edx, eax
mov dword [esp + 0x24], eax
add eax, 0x2e
adc ecx, 0
mov edx, 0xfffffffe
add edx, 0xffffffe4
mov ebx, 0
adc ebx, 0xffffffff
cmp edx, eax
sbb ebx, ecx
jae 0x4055c3
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x4054a2
cmp dword [esp + 8], 0
mov ebx, dword [esp + 0x14]
jne 0x40562e
mov eax, dword [esp + 0x28]
mov ecx, eax
shr ecx, 0x1f
mov dword [esp + 0x6c], ecx
mov dword [esp + 8], 0
mov ecx, dword [esp + 0x78]
add ecx, dword [ebp + 0x38]
mov edx, 0
adc edx, 0xffffffff
add ecx, dword [ebp + 0x40]
adc edx, 0
add eax, eax
add ecx, eax
adc edx, dword [esp + 0x6c]
add ecx, ebx
adc edx, 0
add ecx, dword [esp + 0x70]
adc edx, 0
mov eax, dword [ebp + 8]
add ecx, dword [eax]
adc edx, dword [eax + 4]
add ecx, 0x72
adc edx, 0
cmp edx, 0xffffffff
je 0x40562e
mov dword [edi + 0x34], 1
mov dword [esp + 8], 1
xor ecx, ecx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40565d
mov edx, dword [ebp + 0xc]
cmp byte [eax + edx - 1], 0x2f
mov ebx, dword [ebp + 0x14]
jne 0x405660
test ebx, ebx
jne 0x405498
mov ecx, 0x10
or esi, dword [esp + 0x44]
je 0x405660
jmp 0x405498
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 8]
test ecx, ecx
mov eax, 0x1c
cmove eax, ecx
mov ecx, dword [esp + 0x24]
add eax, ecx
add eax, 0x2e
mov edx, dword [edi + 8]
cmp edx, eax
jae 0x4056ba
test edx, edx
mov ecx, 1
cmovne ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x40568c
push esi
push dword [edi + 0xc]
push dword [edi]
mov ebx, edi
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x4057ff
mov dword [ebx], eax
mov dword [ebx + 8], esi
mov edi, ebx
mov ebx, dword [ebp + 0x14]
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x18]
inc eax
cmp ecx, eax
jae 0x4056fd
test ecx, ecx
mov edx, 1
cmovne edx, ecx
mov esi, edx
add edx, edx
cmp esi, eax
jb 0x4056cf
push esi
push dword [edi + 0x1c]
push dword [edi + 0x10]
mov ebx, edi
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x4057ff
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], esi
mov ebx, dword [ebp + 0x14]
test ebx, ebx
sete cl
xor eax, eax
movzx ebx, byte [esp + 0x20]
or cl, bl
jne 0x405728
push 0x4df40
push 1
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x28]
add esp, 0xc
test eax, eax
je 0x40591b
mov byte [esp + 0x20], bl
mov dword [esp + 8], eax
mov ecx, dword [ebp + 8]
mov edi, dword [esp + 0xc]
mov edx, edi
mov esi, dword [esp + 0x14]
push esi
mov ebx, dword [esp + 0x14]
push ebx
call fcn.00405f00
add esp, 8
test eax, eax
je 0x40580b
cmp dword [esp + 0x40], 0
setne dl
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
add eax, esi
adc ecx, 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
add edi, esi
adc ebx, 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x80], xmm0
movups xmmword [esp + 0x8e], xmm0
mov dh, byte [esp + 0x20]
xor dh, 1
or dh, dl
movzx eax, dh
shl eax, 3
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x34], 0
mov eax, edi
je 0x405820
mov byte [esp + 0x1c], dh
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov esi, 0xfffffffe
cmp esi, edx
mov edi, 0
mov dword [esp + 0x14], ebx
sbb edi, ebx
mov esi, dword [esp + 0x24]
mov dword [esp + 0xc], eax
jb 0x40592a
xor edi, edi
mov ebx, esi
mov esi, 0xfffffffe
cmp esi, ebx
mov esi, ebx
sbb edi, ecx
jb 0x40592a
mov dword [esp + 0x14], 0
xor edi, edi
jmp 0x40597b
mov dword [edi + 0x1c], 0x10
jmp 0x4054a2
push dword [esp + 8]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x4054a2
cmp dword [esp + 0x4c], 0
jne 0x405d2a
test ebx, ebx
jne 0x405d2a
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x80], 0x4034b50
xor ebx, ebx
test dh, dh
mov edx, 0x14
cmove edx, ebx
mov byte [esp + 0x84], dl
mov edx, dword [esp + 0x7c]
movzx eax, dx
mov byte [esp + 0x86], dl
mov byte [esp + 0x87], ah
mov eax, dword [esp + 0x40]
mov byte [esp + 0x88], al
movups xmmword [esp + 0x89], xmm0
mov byte [esp + 0x99], 0
mov eax, dword [esp + 0x28]
mov byte [esp + 0x9a], al
mov edi, eax
mov byte [esp + 0x9b], ah
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x9c], al
mov byte [esp + 0x9d], ah
lea edx, [esp + 0x80]
push 0x1e
push edx
push ecx
push dword [esp + 0x30]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x405a91
mov eax, dword [esp + 0xc]
add eax, 0x1e
mov ecx, esi
mov esi, dword [esp + 0x10]
adc esi, 0
push edi
push dword [ebp + 0xc]
push esi
mov dword [esp + 0x18], eax
push eax
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x405a81
mov ebx, dword [esp + 0xc]
add ebx, edi
adc esi, 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
jmp 0x405aa7
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x4054a2
xor edi, edi
mov eax, esi
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
lea eax, [esp + 0x30]
cmovae eax, edi
cmp esi, edx
mov ecx, 0
sbb ecx, dword [esp + 0x14]
lea esi, [esp + 0x48]
cmovae esi, edi
lea edx, [esp + 0x38]
cmovae edx, edi
lea ecx, [esp + 0xb0]
mov dword [esp + 0x14], ecx
push eax
push esi
call fcn.00405fb0
add esp, 8
mov edi, eax
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x80], 0x4034b50
xor ebx, ebx
cmp byte [esp + 0x1c], 0
mov edx, 0x14
cmove edx, ebx
mov byte [esp + 0x84], dl
mov byte [esp + 0x85], 0
movzx edx, word [esp + 0x7c]
mov byte [esp + 0x86], dl
mov byte [esp + 0x87], dh
mov eax, dword [ebp + 0x38]
lea edx, [edi + eax]
mov eax, dword [esp + 0x40]
mov byte [esp + 0x88], al
xorps xmm0, xmm0
movups xmmword [esp + 0x89], xmm0
mov byte [esp + 0x99], 0
mov eax, dword [esp + 0x28]
mov byte [esp + 0x9a], al
mov byte [esp + 0x9b], ah
mov byte [esp + 0x9c], dl
mov byte [esp + 0x9d], dh
lea edx, [esp + 0x80]
push 0x1e
push edx
push ecx
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
mov eax, dword [esp + 0x10]
jne 0x405a91
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0xc]
add edi, 0x1e
adc eax, 0
mov ecx, esi
mov esi, dword [esp + 0x28]
push esi
push dword [ebp + 0xc]
mov dword [esp + 0x18], eax
push eax
push edi
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405a81
add edi, esi
mov ecx, dword [esp + 0x10]
adc ecx, 0
cmp dword [esp + 0x14], 0
mov ebx, edi
je 0x405a9d
lea eax, [esp + 0xb0]
mov edi, dword [esp + 0x1c]
push edi
push eax
mov esi, ecx
push ecx
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x405acf
add ebx, edi
adc esi, 0
jmp 0x405aa7
push dword [esp + 8]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x4054a4
mov esi, ecx
mov dword [esp + 0x14], 0
mov edi, dword [ebp + 0x38]
test edi, edi
je 0x405ade
push edi
push dword [ebp + 0x34]
push esi
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x405acf
add ebx, edi
mov dword [esp + 0xc], ebx
adc esi, 0
jmp 0x405ae2
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x4054a2
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
cmp byte [esp + 0x20], 0
je 0x405b2d
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x18]
push dword [esp + 0x18]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405cee
mov eax, dword [ebp + 0x14]
add dword [esp + 0xc], eax
adc dword [esp + 0x10], 0
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], 0
jmp 0x405bf1
cmp dword [ebp + 0x14], 0
je 0x405bf1
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov edx, dword [esp + 0x2c]
cmp edx, 0xa
mov ecx, 0xa
cmovl ecx, edx
mov dword [esp + 0x60], 0
xor eax, eax
cmp edx, 4
setl al
shl eax, 0xe
or eax, dword [ecx*4 + 0x439988]
mov ecx, eax
or ecx, 0x80000
test edx, edx
cmovne ecx, eax
lea eax, [esp + 0x50]
push ecx
push eax
push 0x406020
mov esi, dword [esp + 0x14]
push esi
call fcn.00404850
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xac], eax
lea eax, [esp + 0xac]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.00403390
add esp, 0x18
cmp eax, 1
jne 0x405d0a
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
push dword [esp + 8]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edi, eax
mov dword [esp + 0x2c], ecx
or eax, ecx
je 0x405e25
mov dword [esp + 0x50], 0x8074b50
mov ecx, dword [esp + 0x74]
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 ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
cmp dword [esp + 0x14], 0
je 0x405d26
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, edx
shr eax, 0x10
shr ecx, 0x18
mov byte [esp + 0x5b], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x5c], dl
mov byte [esp + 0x5d], dh
mov byte [esp + 0x5e], al
mov byte [esp + 0x5f], cl
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 + 0x20], 0x38
mov dword [esp + 0x70], 0x30
mov ecx, 0x28
mov dword [esp + 8], 0x18
mov dword [esp + 0x24], 0x17
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x1b], al
mov dword [esp + 0x6c], 0x16
mov dword [esp + 0xa4], 0x15
mov dword [esp + 0xa0], 0x14
jmp 0x405d86
push dword [esp + 8]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x4054a2
push dword [esp + 8]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x4054a2
test edx, edx
je 0x405d39
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x4054a2
mov dword [esp + 0x58], ecx
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x70], 0x10
mov ecx, 8
mov dword [esp + 0x24], 0xf
mov dword [esp + 0x6c], 0xe
mov eax, edi
mov byte [esp + 0x1b], al
mov dword [esp + 0xa4], 0xd
mov dword [esp + 0xa0], 0xc
mov dword [esp + 8], 0x10
mov ebx, edi
mov edx, dword [esp + 0x2c]
shrd ebx, edx, cl
mov eax, edx
shr eax, cl
test cl, 0x20
cmove eax, ebx
mov esi, edi
mov ecx, dword [esp + 0x70]
shrd esi, edx, cl
mov dword [esp + 0xa8], esi
movzx ebx, byte [esp + 0x1b]
mov esi, dword [esp + 0xa0]
mov byte [esp + esi + 0x50], bl
mov ebx, dword [esp + 0xa4]
mov byte [esp + ebx + 0x50], al
mov eax, edx
shr eax, cl
test cl, 0x20
cmove eax, dword [esp + 0xa8]
mov ecx, dword [esp + 0x6c]
mov byte [esp + ecx + 0x50], al
mov ecx, dword [esp + 0x20]
shrd edi, edx, cl
shr edx, cl
test cl, 0x20
cmove edx, edi
mov eax, dword [esp + 0x24]
mov byte [esp + eax + 0x50], dl
lea eax, [esp + 0x50]
mov esi, dword [esp + 8]
push esi
push eax
push dword [esp + 0x18]
push dword [esp + 0x18]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4054a2
mov eax, dword [esp + 8]
add dword [esp + 0xc], eax
adc dword [esp + 0x10], 0
cmp dword [esp + 0x14], 0
je 0x405e77
xor ecx, ecx
mov edx, 0xfffffffe
cmp edx, dword [esp + 0x30]
mov eax, 0
sbb eax, dword [esp + 0x34]
lea eax, [esp + 0x30]
cmovae eax, ecx
cmp edx, dword [esp + 0x38]
mov edx, 0
sbb edx, dword [esp + 0x3c]
lea esi, [esp + 0x48]
cmovae esi, ecx
lea edx, [esp + 0x38]
cmovae edx, ecx
lea ecx, [esp + 0xb0]
push eax
push esi
call fcn.00405fb0
add esp, 8
mov dword [esp + 0x1c], eax
movzx ebx, word [esp + 0x7c]
movzx esi, word [esp + 0x40]
movzx eax, word [esp + 0x1c]
movzx edi, word [esp + 0x28]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x4c]
push dword [esp + 0x40]
push dword [esp + 0x40]
push 0
push 0
push ebx
push esi
push dword [esp + 0x98]
push dword [esp + 0x74]
push dword [esp + 0x74]
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push dword [esp + 0xb0]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x58]
push edi
call fcn.00406090
add esp, 0x4c
test eax, eax
je 0x4054a2
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x4054a4