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

Disassembly:
push ebp
lea eax, [ecx + 0x8c]
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
mov ecx, eax
lea edi, [ebx + 8]
sub esp, 0x6c
mov dword [ebp - 0x54], eax
mov dword [esp], 0
call dword [0x5d43f0]
mov eax, dword [0x5d4280]
sub esp, 4
mov ecx, edi
mov dword [ebx], 0x5af338
mov dword [ebx + 0x8c], 0x5af398
mov dword [ebx + 4], eax
mov eax, dword [0x5d41e4]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [0x5d4554]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x68], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [0x5d448c]
mov eax, dword [ebx + 8]
sub esp, 4
lea ecx, [ebp - 0x2c]
mov dword [esp + 8], 1
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 4
mov dword [esp + 4], eax
mov eax, dword [0x5d466c]
mov dword [ebp - 0x4c], eax
call eax
mov eax, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x4fd210
mov edx, dword [eax + 4]
mov dword [esp + 4], edx
add eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [0x5d4414]
mov dword [ebp - 0x50], eax
call eax
test eax, eax
jne 0x409fc0
mov dword [ebx + 0x70], 0x10
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
test edx, edx
je 0x409fa0
cmp edx, 0xffffffff
je 0x40995f
lock sub dword [eax], 1
mov eax, dword [ebp - 0x2c]
je 0x409fa0
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea ecx, [ebp - 0x2c]
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 3
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
mov eax, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x4fd210
mov edx, dword [eax + 4]
mov dword [esp + 4], edx
add eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x40a010
mov dword [ebx + 0x74], 0x10
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
test edx, edx
je 0x409f80
cmp edx, 0xffffffff
je 0x4099dd
lock sub dword [eax], 1
mov eax, dword [ebp - 0x2c]
je 0x409f80
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea ecx, [ebp - 0x2c]
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
mov eax, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x4fd210
mov edx, dword [eax + 4]
mov dword [esp + 4], edx
add eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x40a060
mov dword [ebx + 0x78], 0x10
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
test edx, edx
je 0x409f60
cmp edx, 0xffffffff
je 0x409a5b
lock sub dword [eax], 1
mov eax, dword [ebp - 0x2c]
je 0x409f60
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea ecx, [ebp - 0x2c]
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
mov eax, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x4fd210
mov edx, dword [eax + 4]
mov dword [esp + 4], edx
add eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
jne 0x40a0b0
mov dword [ebx + 0x7c], 0x10
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
test edx, edx
je 0x409f42
cmp edx, 0xffffffff
je 0x409ad9
lock sub dword [eax], 1
mov eax, dword [ebp - 0x2c]
je 0x409f42
mov eax, dword [0x5d4554]
lea edi, [ebp - 0x44]
mov ecx, edi
mov dword [ebp - 0x44], eax
call fcn.004d0440
mov eax, dword [ebx + 0x70]
test eax, eax
jle 0x409b21
lea esi, [ebp - 0x28]
mov dword [ebp - 0x4c], 0
lea esi, [esi]
xor eax, eax
mov dword [esp], esi
mov ecx, edi
mov word [ebp - 0x28], ax
call fcn.004d0470
add dword [ebp - 0x4c], 1
mov eax, dword [ebx + 0x70]
sub esp, 4
mov edx, dword [ebp - 0x4c]
cmp eax, edx
jg 0x409b00
mov word [ebx + 0x12], ax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x14], 1
mov byte [ebx + 0x1c], 1
mov eax, dword [eax + 0x3c]
mov word [ebx + 0x10], ax
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x18], eax
je 0x409b64
lea ecx, [ebp - 0x40]
mov dword [esp], edi
call fcn.004d0520
mov eax, dword [ebp - 0x40]
mov edx, dword [ebx + 0x18]
lea ecx, [ebp - 0x40]
sub esp, 4
mov dword [ebx + 0x18], eax
mov dword [ebp - 0x40], edx
call fcn.004d05a0
mov ecx, edi
call fcn.004d0440
mov eax, dword [ebx + 0x78]
test eax, eax
jle 0x409ba1
lea esi, [ebp - 0x28]
mov dword [ebp - 0x4c], 0
lea esi, [esi]
xor eax, eax
mov dword [esp], esi
mov ecx, edi
mov word [ebp - 0x28], ax
call fcn.004d0470
add dword [ebp - 0x4c], 1
mov eax, dword [ebx + 0x78]
sub esp, 4
mov ecx, dword [ebp - 0x4c]
cmp eax, ecx
jg 0x409b80
mov word [ebx + 0x42], ax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x44], 0
mov byte [ebx + 0x4c], 0
mov eax, dword [eax + 0x44]
mov word [ebx + 0x40], ax
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x48], eax
je 0x409be4
lea ecx, [ebp - 0x3c]
mov dword [esp], edi
call fcn.004d0520
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebx + 0x48]
lea ecx, [ebp - 0x3c]
sub esp, 4
mov dword [ebx + 0x48], eax
mov dword [ebp - 0x3c], edx
call fcn.004d05a0
mov ecx, edi
call fcn.004d0440
mov eax, dword [ebx + 0x74]
test eax, eax
jle 0x409c21
lea esi, [ebp - 0x28]
mov dword [ebp - 0x4c], 0
lea esi, [esi]
xor eax, eax
mov dword [esp], esi
mov ecx, edi
mov word [ebp - 0x28], ax
call fcn.004d0470
add dword [ebp - 0x4c], 1
mov eax, dword [ebx + 0x74]
sub esp, 4
mov edx, dword [ebp - 0x4c]
cmp eax, edx
jg 0x409c00
mov word [ebx + 0x22], ax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x24], 2
mov byte [ebx + 0x2c], 1
mov eax, dword [eax + 0x40]
mov word [ebx + 0x20], ax
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x28], eax
je 0x409c64
lea ecx, [ebp - 0x38]
mov dword [esp], edi
call fcn.004d0520
mov eax, dword [ebp - 0x38]
mov edx, dword [ebx + 0x28]
lea ecx, [ebp - 0x38]
sub esp, 4
mov dword [ebx + 0x28], eax
mov dword [ebp - 0x38], edx
call fcn.004d05a0
mov ecx, edi
call fcn.004d0440
mov eax, dword [ebx + 0x74]
test eax, eax
jle 0x409ca4
lea esi, [ebp - 0x28]
mov dword [ebp - 0x4c], 0
lea esi, [esi]
xor eax, eax
mov dword [esp], esi
mov ecx, edi
mov word [ebp - 0x28], ax
call fcn.004d0470
mov eax, dword [ebx + 0x74]
add dword [ebp - 0x4c], 1
sub esp, 4
mov ecx, dword [ebp - 0x4c]
lea edx, [eax + eax]
cmp edx, ecx
jg 0x409c80
add eax, eax
mov dword [ebx + 0x34], 2
mov byte [ebx + 0x3c], 1
mov word [ebx + 0x32], ax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x40]
lea eax, [eax + eax + 0x3e8]
mov word [ebx + 0x30], ax
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x38], eax
je 0x409cf0
lea ecx, [ebp - 0x34]
mov dword [esp], edi
call fcn.004d0520
mov eax, dword [ebp - 0x34]
mov edx, dword [ebx + 0x38]
lea ecx, [ebp - 0x34]
sub esp, 4
mov dword [ebx + 0x38], eax
mov dword [ebp - 0x34], edx
call fcn.004d05a0
mov ecx, edi
call fcn.004d0440
mov eax, dword [ebx + 0x7c]
test eax, eax
jle 0x409d34
lea esi, [ebp - 0x28]
mov dword [ebp - 0x4c], 0
nop
lea esi, [esi]
xor eax, eax
mov dword [esp], esi
mov ecx, edi
mov word [ebp - 0x28], ax
call fcn.004d0470
mov eax, dword [ebx + 0x7c]
add dword [ebp - 0x4c], 1
sub esp, 4
mov ecx, dword [ebp - 0x4c]
lea edx, [eax + eax]
cmp edx, ecx
jg 0x409d10
add eax, eax
mov dword [ebx + 0x64], 3
mov byte [ebx + 0x6c], 0
mov word [ebx + 0x62], ax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x4c], eax
movzx eax, word [ebp - 0x4c]
add ax, 0x3e8
mov word [ebx + 0x60], ax
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x68], eax
je 0x409d84
lea ecx, [ebp - 0x30]
mov dword [esp], edi
call fcn.004d0520
mov eax, dword [ebp - 0x30]
mov edx, dword [ebx + 0x68]
lea ecx, [ebp - 0x30]
sub esp, 4
mov dword [ebx + 0x68], eax
mov dword [ebp - 0x30], edx
call fcn.004d05a0
mov ecx, edi
call fcn.004d0440
mov eax, dword [ebx + 0x7c]
test eax, eax
jle 0x409dc1
lea esi, [ebp - 0x28]
mov dword [ebp - 0x4c], 0
lea esi, [esi]
xor ecx, ecx
mov dword [esp], esi
mov word [ebp - 0x28], cx
mov ecx, edi
call fcn.004d0470
add dword [ebp - 0x4c], 1
mov eax, dword [ebx + 0x7c]
sub esp, 4
mov edx, dword [ebp - 0x4c]
cmp eax, edx
jg 0x409da0
mov word [ebx + 0x52], ax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x54], 3
mov byte [ebx + 0x5c], 0
mov edx, dword [eax + 0x48]
lea eax, [edx + edx]
mov word [ebx + 0x50], ax
mov eax, dword [ebp - 0x44]
cmp dword [ebx + 0x58], eax
je 0x409e0d
lea ecx, [ebp - 0x2c]
mov dword [esp], edi
call fcn.004d0520
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebx + 0x58]
lea ecx, [ebp - 0x2c]
sub esp, 4
mov dword [ebx + 0x58], eax
mov dword [ebp - 0x2c], edx
call fcn.004d05a0
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 0x48]
mov eax, dword [0x5d4554]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x38]
mov eax, dword [ecx + 0xc]
sub eax, dword [ecx + 8]
mov ecx, dword [esi + 0x40]
mov dword [ebx + 0x88], edx
mov edx, 1
mov word [ebp - 0x26], dx
lea esi, [ebp - 0x28]
lea edx, [ebx + 4]
mov byte [ebp - 0x1c], 1
mov dword [ebx + 0x80], eax
add ax, 0xd80
mov dword [ebx + 0x84], ecx
mov word [ebp - 0x28], ax
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], esi
mov ecx, edx
mov dword [ebp - 0x4c], edx
mov dword [esp], eax
call fcn.004c64f0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4c]
sub esp, 8
mov byte [ebp - 0x1c], 0
mov eax, dword [eax + 0x40]
mov dword [esp + 4], esi
mov dword [ebp - 0x50], eax
movzx eax, word [ebp - 0x50]
add ax, 0xdac
mov word [ebp - 0x28], ax
mov eax, dword [ebx + 0x74]
mov word [ebp - 0x26], ax
movzx eax, word [ebx + 0x84]
add ax, 0xdac
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.004c64f0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4c]
sub esp, 8
mov eax, dword [eax + 0x48]
mov dword [esp + 4], esi
mov dword [ebp - 0x50], eax
movzx eax, word [ebp - 0x50]
add ax, 0x1194
mov word [ebp - 0x28], ax
mov eax, dword [ebx + 0x7c]
mov word [ebp - 0x26], ax
movzx eax, word [ebx + 0x88]
add ax, 0x1194
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.004c64f0
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x70]
sub esp, 8
mov dword [ebp - 0x2c], ebx
add dword [esi + 0x3c], eax
mov eax, dword [ebx + 0x74]
lea ecx, [esi + 0x38]
add dword [esi + 0x40], eax
mov eax, dword [ebx + 0x78]
add dword [esi + 0x44], eax
mov eax, dword [ebx + 0x7c]
add dword [esi + 0x48], eax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.004cf910
lea ecx, [ebp - 0x20]
sub esp, 4
call fcn.004d05a0
mov ecx, edi
call fcn.004d05a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [0x5d41e0]
jmp 0x409ad9
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [0x5d41e0]
jmp 0x409a5b
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [0x5d41e0]
jmp 0x4099dd
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [0x5d41e0]
jmp 0x40995f
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea esi, [ebp - 0x28]
mov ecx, esi
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
lea eax, [ebp - 0x45]
sub esp, 0xc
mov ecx, esi
mov dword [esp + 4], 0x10
mov dword [esp], eax
call dword [0x5d4680]
sub esp, 8
mov dword [ebx + 0x70], eax
mov ecx, esi
call fcn.004d4420
jmp 0x409940
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea esi, [ebp - 0x28]
mov ecx, esi
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 3
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
lea eax, [ebp - 0x45]
sub esp, 0xc
mov ecx, esi
mov dword [esp + 4], 0x10
mov dword [esp], eax
call dword [0x5d4680]
sub esp, 8
mov dword [ebx + 0x74], eax
mov ecx, esi
call fcn.004d4420
jmp 0x4099be
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea esi, [ebp - 0x28]
mov ecx, esi
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
lea eax, [ebp - 0x45]
sub esp, 0xc
mov ecx, esi
mov dword [esp + 4], 0x10
mov dword [esp], eax
call dword [0x5d4680]
sub esp, 8
mov dword [ebx + 0x78], eax
mov ecx, esi
call fcn.004d4420
jmp 0x409a3c
mov eax, dword [ebx + 8]
mov dword [esp + 8], 1
lea esi, [ebp - 0x28]
mov ecx, esi
mov eax, dword [eax + 4]
mov dword [esp], edi
sub eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
call eax
lea eax, [ebp - 0x45]
sub esp, 0xc
mov ecx, esi
mov dword [esp + 4], 0x10
mov dword [esp], eax
call dword [0x5d4680]
sub esp, 8
mov dword [ebx + 0x7c], eax
mov ecx, esi
call fcn.004d4420
jmp 0x409aba