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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45f49e
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x476458]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push esi
push edi
mov eax, dword [0x476458]
xor eax, esp
push eax
lea eax, [esp + 0x228]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 6
mov edi, ecx
xor ebx, ebx
push str.maxwin
lea ecx, [esp + 0x54]
mov dword [esp + 0x24], eax
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], ebx
call fcn.00406110
cmp dword [eax + 0x10], ebx
mov esi, 0x10
setne byte [esp + 0x17]
mov dword [esp + 0x230], 0xffffffff
cmp dword [esp + 0x60], esi
jb 0x40c628
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40c6ab
push 6
push str.maxwin
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 1
call fcn.00406110
cmp dword [eax + 0x14], esi
jb 0x40c66b
mov eax, dword [eax]
push 0xa
push ebx
push eax
call fcn.004415c1
add esp, 0xc
mov dword [esp + 0x230], 0xffffffff
mov dword [esp + 0x18], eax
cmp dword [esp + 0x60], esi
jb 0x40c699
mov edx, dword [esp + 0x4c]
push edx
call fcn.004410cb
add esp, 4
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40c6ab
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x8c], eax
push 8
push str.minclose
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 2
call fcn.00406110
cmp dword [eax + 0x10], ebx
mov dword [esp + 0x230], 0xffffffff
setne byte [esp + 0x17]
cmp dword [esp + 0x60], esi
jb 0x40c707
mov edx, dword [esp + 0x4c]
push edx
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40c78a
push 8
push str.minclose
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 3
call fcn.00406110
cmp dword [eax + 0x14], esi
jb 0x40c74a
mov eax, dword [eax]
push 0xa
push ebx
push eax
call fcn.004415ec
add esp, 0xc
mov dword [esp + 0x230], 0xffffffff
mov dword [esp + 0x18], eax
cmp dword [esp + 0x60], esi
jb 0x40c778
mov eax, dword [esp + 0x4c]
push eax
call fcn.004410cb
add esp, 4
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40c78a
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x90], eax
push 6
push str.fbwvol
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 4
call fcn.00406110
cmp dword [eax + 0x10], ebx
mov dword [esp + 0x230], 0xffffffff
setne byte [esp + 0x17]
cmp dword [esp + 0x60], esi
jb 0x40c7e6
mov edx, dword [esp + 0x4c]
push edx
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40c869
push 6
push str.fbwvol
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 5
call fcn.00406110
cmp dword [eax + 0x14], esi
jb 0x40c829
mov eax, dword [eax]
push 0xa
push ebx
push eax
call fcn.004415ec
add esp, 0xc
mov dword [esp + 0x230], 0xffffffff
mov dword [esp + 0x18], eax
cmp dword [esp + 0x60], esi
jb 0x40c857
mov eax, dword [esp + 0x4c]
push eax
call fcn.004410cb
add esp, 4
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40c869
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x94], eax
push 9
push str.fbwmemlim
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 6
call fcn.00406110
cmp dword [eax + 0x10], ebx
mov dword [esp + 0x230], 0xffffffff
setne byte [esp + 0x17]
cmp dword [esp + 0x60], esi
jb 0x40c8c5
mov edx, dword [esp + 0x4c]
push edx
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40c948
push 9
push str.fbwmemlim
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 7
call fcn.00406110
cmp dword [eax + 0x14], esi
jb 0x40c908
mov eax, dword [eax]
push 0xa
push ebx
push eax
call fcn.004415ec
add esp, 0xc
mov dword [esp + 0x230], 0xffffffff
mov dword [esp + 0x18], eax
cmp dword [esp + 0x60], esi
jb 0x40c936
mov eax, dword [esp + 0x4c]
push eax
call fcn.004410cb
add esp, 4
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40c948
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x98], eax
push 5
push str.uhash
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 8
call fcn.00406110
cmp dword [eax + 0x10], ebx
mov dword [esp + 0x230], 0xffffffff
setne byte [esp + 0x17]
cmp dword [esp + 0x60], esi
jb 0x40c9a4
mov edx, dword [esp + 0x4c]
push edx
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40cad5
push 5
push str.uhash
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov dword [esp + 0x230], 9
call fcn.00406110
mov ecx, dword [esp + 0x1c]
push 0xffffffffffffffff
push ebx
add ecx, 0x9c
push eax
call fcn.00402c70
mov dword [esp + 0x230], 0xffffffff
cmp dword [esp + 0x60], esi
jb 0x40ca15
mov eax, dword [esp + 0x4c]
push eax
call fcn.004410cb
add esp, 4
push 5
push str.uhash
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
mov dword [esp + 0x230], 0xa
push 5
push str.uhash
lea ecx, [esp + 0x70]
mov dword [esp + 0x84], 0xf
mov dword [esp + 0x80], ebx
mov byte [esp + 0x70], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov byte [esp + 0x230], 0xb
call fcn.00406110
mov ecx, dword [esp + 0x1c]
add ecx, 0xb8
lea edx, [esp + 0x68]
mov dword [esp + 0x18], eax
call fcn.00406110
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push ebx
push ecx
mov ecx, eax
call fcn.00402c70
cmp dword [esp + 0x7c], esi
jb 0x40cab2
mov edx, dword [esp + 0x68]
push edx
call fcn.004410cb
add esp, 4
mov dword [esp + 0x7c], 0xf
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
cmp dword [esp + 0x60], esi
jb 0x40cad5
mov eax, dword [esp + 0x4c]
push eax
call fcn.004410cb
add esp, 4
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x230], 0xc
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x230], 0xe
push 0xd
push str.fbw_cpau_tags
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov byte [esp + 0x230], 0xf
call fcn.00406110
cmp dword [eax + 0x10], ebx
mov byte [esp + 0x230], 0xe
setne byte [esp + 0x17]
cmp dword [esp + 0x60], esi
jb 0x40cb62
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40cf30
push 0xd
push str.fbw_cpau_tags
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
mov byte [esp + 0x230], 0x10
call fcn.0043f5a4
mov esi, eax
mov dword [esp + 0x48], esi
call fcn.0043f363
push ebx
lea ecx, [esp + 0x48]
mov dword [esp + 0x1c], eax
call fcn.0043f698
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 4]
cmp eax, 0xffffffff
jae 0x40cbc4
inc eax
mov ecx, edx
mov dword [ecx + 4], eax
lea ecx, [esp + 0x44]
call fcn.0043f6c0
lea edx, [esp + 0x4c]
mov ecx, edi
mov byte [esp + 0x230], 0x11
call fcn.00406110
push ecx
mov dword [esp + 0x24], eax
mov eax, esp
mov dword [esp + 0x1c], esp
push ebx
lea ecx, [esp + 0x20]
mov dword [eax], esi
call fcn.0043f698
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
jae 0x40cc03
inc eax
mov dword [esi + 4], eax
lea ecx, [esp + 0x1c]
call fcn.0043f6c0
mov edx, dword [esp + 0x24]
push edx
mov ecx, 0x468260
call fcn.0040fd00
add esp, 8
push ebx
lea ecx, [esp + 0x24]
mov byte [esp + 0x1b], al
mov byte [esp + 0x234], 0x10
call fcn.0043f698
mov eax, dword [esi + 4]
cmp eax, ebx
jbe 0x40cc44
cmp eax, 0xffffffff
jae 0x40cc44
dec eax
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
neg eax
sbb eax, eax
not eax
and eax, esi
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], eax
call fcn.0043f6c0
cmp dword [esp + 0x18], ebx
je 0x40cc6e
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov byte [esp + 0x230], 0xe
cmp dword [esp + 0x60], 0x10
jb 0x40cc8a
mov eax, dword [esp + 0x4c]
push eax
call fcn.004410cb
add esp, 4
cmp byte [esp + 0x17], bl
je 0x40ccd4
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x1a8]
cmp esi, dword [eax + 0x1ac]
je 0x40cf30
push esi
lea ecx, [esp + 0x28]
push ecx
call fcn.00405fd0
test al, al
jne 0x40ccc0
mov ecx, esi
lea edi, [esp + 0x24]
call fcn.00406340
mov edx, dword [esp + 0x1c]
add esi, 0x1c
cmp esi, dword [edx + 0x1ac]
jne 0x40cca6
jmp 0x40cf30
mov esi, 0xf
mov dword [esp + 0x98], esi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
mov byte [esp + 0x230], 0x12
push 1
push 0x468264
lea ecx, [esp + 0xa8]
mov dword [esp + 0xbc], esi
mov dword [esp + 0xb8], ebx
mov byte [esp + 0xa8], bl
call fcn.00402d60
mov word [esp + 0xbc], bx
mov dword [esp + 0xc0], ebx
mov byte [esp + 0xc4], bl
mov byte [esp + 0x230], 0x14
push 0xd
push str.fbw_cpau_tags
lea ecx, [esp + 0x54]
mov dword [esp + 0x68], esi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.00402d60
lea edx, [esp + 0x4c]
mov ecx, edi
mov byte [esp + 0x230], 0x15
call fcn.00406110
mov edx, 0x10
cmp dword [eax + 0x14], edx
jb 0x40cd79
mov ecx, dword [eax]
jmp 0x40cd7b
mov ecx, eax
mov dword [esp + 0xcc], ecx
cmp dword [eax + 0x14], edx
jb 0x40cd8b
mov ecx, dword [eax]
jmp 0x40cd8d
mov ecx, eax
mov eax, dword [eax + 0x10]
add eax, ecx
lea ecx, [esp + 0xd4]
push ecx
lea edi, [esp + 0x88]
mov dword [esp + 0xd4], eax
call fcn.00411130
mov byte [esp + 0x230], 0x17
cmp dword [esp + 0x60], 0x10
jb 0x40cdc9
mov edx, dword [esp + 0x4c]
push edx
call fcn.004410cb
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
lea eax, [esp + 0xcc]
push ecx
lea ebx, [esp + 0x140]
mov dword [esp + 0x64], esi
mov dword [esp + 0x1c], eax
call fcn.0040fb70
add esp, 4
lea edx, [esp + 0x18]
push edx
lea ebx, [esp + 0x1b0]
mov byte [esp + 0x234], 0x18
call fcn.0040fc20
add esp, 4
mov byte [esp + 0x230], 0x19
mov al, byte [esp + 0x188]
nop
mov dl, byte [esp + 0x1f8]
xor ebx, ebx
cmp dl, bl
je 0x40d098
cmp al, bl
je 0x40d098
mov eax, dword [esp + 0x1f0]
cmp eax, dword [esp + 0x180]
jne 0x40d0a7
mov ecx, dword [esp + 0x1f4]
cmp ecx, dword [esp + 0x184]
jne 0x40d0a7
lea esi, [esp + 0x1ac]
call fcn.00411470
lea esi, [esp + 0x13c]
call fcn.00411470
mov esi, 0x10
cmp dword [esp + 0x104], esi
jb 0x40ce97
mov eax, dword [esp + 0xf0]
push eax
call fcn.004410cb
add esp, 4
mov edi, 0xf
mov dword [esp + 0x104], edi
mov dword [esp + 0x100], ebx
mov byte [esp + 0xf0], bl
cmp dword [esp + 0xe8], esi
jb 0x40ceca
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.004410cb
add esp, 4
mov byte [esp + 0x230], 0xe
mov dword [esp + 0xe8], edi
mov dword [esp + 0xe4], ebx
mov byte [esp + 0xd4], bl
cmp dword [esp + 0xb4], esi
jb 0x40cf00
mov edx, dword [esp + 0xa0]
push edx
call fcn.004410cb
add esp, 4
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], bl
cmp dword [esp + 0x98], esi
jb 0x40cf2e
mov eax, dword [esp + 0x84]
push eax
call fcn.004410cb
add esp, 4
xor ebx, ebx
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
add edi, 0x198
mov dword [esp + 0x18], edi
cmp esi, dword [esp + 0x28]
je 0x40cf6b
push esi
push edi
call fcn.00405fd0
test al, al
jne 0x40cf62
mov ecx, esi
lea edi, [esp + 0x68]
call fcn.00406340
mov edi, dword [esp + 0x18]
add esi, 0x1c
cmp esi, dword [esp + 0x28]
jne 0x40cf48
mov esi, dword [edi]
cmp esi, dword [edi + 4]
je 0x40cf98
push esi
lea ecx, [esp + 0x28]
push ecx
call fcn.00405fd0
test al, al
jne 0x40cf90
mov ecx, esi
lea edi, [esp + 0x34]
call fcn.00406340
mov edi, dword [esp + 0x18]
add esi, 0x1c
cmp esi, dword [edi + 4]
jne 0x40cf72
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x34]
add edi, 0x178
push edi
call fcn.00406490
mov edx, dword [esp + 0x38]
cmp esi, edx
je 0x40cfd3
mov ecx, dword [esp + 0x1c]
mov eax, esi
call fcn.004115d0
test al, al
jne 0x40cfca
mov ecx, esi
call fcn.00406340
add esi, 0x1c
cmp esi, dword [esp + 0x38]
jne 0x40cfb4
mov esi, dword [esp + 0x68]
cmp esi, dword [esp + 0x6c]
je 0x40d002
mov edi, dword [esp + 0x1c]
add edi, 0x188
push esi
push edi
call fcn.00405fd0
test al, al
jne 0x40cff9
mov ecx, esi
call fcn.00406340
add esi, 0x1c
cmp esi, dword [esp + 0x6c]
jne 0x40cfe7
mov esi, dword [esp + 0x18]
push esi
call fcn.00406490
lea eax, [esp + 0x24]
push eax
mov eax, esi
call fcn.0040f7e0
cmp dword [esp + 0x24], ebx
je 0x40d036
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov eax, esi
call fcn.00406720
push esi
call fcn.004410cb
add esp, 4
cmp dword [esp + 0x34], ebx
je 0x40d054
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov eax, esi
call fcn.00406720
push esi
call fcn.004410cb
add esp, 4
cmp dword [esp + 0x68], ebx
je 0x40d072
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x6c]
mov eax, esi
call fcn.00406720
push esi
call fcn.004410cb
add esp, 4
mov ecx, dword [esp + 0x228]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.00440ba3
mov esp, ebp
pop ebp
ret 4
xor ecx, ecx
cmp dl, al
sete cl
cmp cl, bl
jne 0x40ce61
lea eax, [esp + 0x18c]
lea esi, [esp + 0x120]
call fcn.004114d0
mov edx, esi
push edx
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x238], 0x1a
call fcn.00405fd0
test al, al
jne 0x40d0de
mov ecx, esi
lea edi, [esp + 0x24]
call fcn.00406340
mov byte [esp + 0x230], 0x19
cmp dword [esp + 0x134], 0x10
jb 0x40d100
mov ecx, dword [esp + 0x120]
push ecx
call fcn.004410cb
add esp, 4
mov edx, dword [esp + 0x184]
push edx
lea ebx, [esp + 0x190]
lea eax, [esp + 0x184]
lea edi, [esp + 0x140]
call fcn.00410e50
mov byte [esp + 0x188], al
jmp 0x40ce20