Function at 0x402890
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4a332c
mov eax, dword fs:[0]
push eax
mov eax, 0x1068
call fcn.00498c40
mov eax, dword [0x4d32ac]
xor eax, esp
mov dword [esp + 0x1060], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d32ac]
xor eax, esp
push eax
lea eax, [esp + 0x107c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x108c]
mov edi, ecx
push edi
mov dword [esp + 0x30], eax
call dword [0x4a7350]
test eax, eax
je 0x402d75
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x20], ebx
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push edi
mov dword [esp + 0x10a0], esi
call dword [0x4a72f8]
cmp eax, 0xffffffff
jne 0x402a79
call fcn.00404790
cmp eax, esi
jne 0x402d75
mov ebp, dword [0x4a7310]
push esi
lea ecx, [esp + 0x20]
push ecx
push 0x40
lea edx, [esp + 0x40]
push edx
push ebx
mov dword [esp + 0x30], esi
call ebp
cmp eax, esi
jne 0x40294a
call fcn.00404790
push 0x1000
lea eax, [esp + 0x78]
push esi
push eax
mov dword [esp + 0x28], 0x40
call fcn.00485090
add esp, 0xc
push esi
lea ecx, [esp + 0x1c]
push ecx
push 0x22
lea edx, [esp + 0x80]
push edx
push ebx
mov dword [esp + 0x2c], esi
call ebp
cmp eax, esi
jne 0x402a84
call fcn.00404790
cmp eax, esi
jne 0x402d6a
mov edi, dword [esp + 0x74]
push esi
lea eax, [esp + 0x1c]
push eax
add edi, 0xffffffde
push edi
lea ecx, [esp + 0xa2]
push ecx
push ebx
mov dword [esp + 0x2c], esi
call ebp
cmp eax, esi
jne 0x402a8e
call fcn.00404790
cmp eax, esi
jne 0x402d45
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x28], ebp
mov byte [esp + 0x1084], 1
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
mov byte [esp + 0x1084], 2
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x1084], 3
movzx ecx, word [esp + 0x80]
mov eax, dword [ebp - 8]
shr ecx, 1
mov edx, 1
sub edx, dword [ebp - 4]
sub eax, ecx
or eax, edx
jge 0x402a48
lea eax, [esp + 0x28]
call fcn.00404d50
mov ebp, dword [esp + 0x28]
movzx ecx, word [esp + 0x80]
push ecx
lea edx, [esp + 0x9a]
push edx
push ebp
call fcn.00483140
movzx eax, word [esp + 0x8c]
shr eax, 1
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402aaf
cmp ebp, esi
jne 0x402a97
xor eax, eax
jmp 0x402ab7
mov dword [esp + 0x20], eax
mov ebx, eax
jmp 0x402927
cmp dword [esp + 0x18], 0x22
jmp 0x40298b
cmp dword [esp + 0x18], edi
jmp 0x4029bd
mov eax, ebp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x402aa0
sub eax, edx
sar eax, 1
cmp eax, esi
jl 0x402d60
cmp eax, dword [ebp - 8]
jg 0x402d60
mov dword [ebp - 0xc], eax
mov word [ebp + eax*2], si
movzx ecx, word [esp + 0x82]
mov eax, dword [edi - 8]
movzx esi, word [esp + 0x80]
shr ecx, 1
mov edx, 1
sub edx, dword [edi - 4]
sub eax, ecx
or eax, edx
jge 0x402af8
lea eax, [esp + 0x24]
call fcn.00404d50
mov edi, dword [esp + 0x24]
movzx ecx, word [esp + 0x82]
lea eax, [esp + 0x96]
push ecx
add eax, esi
push eax
push edi
call fcn.00483140
movzx eax, word [esp + 0x8e]
shr eax, 1
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402b3f
test edi, edi
jne 0x402b2b
xor eax, eax
jmp 0x402b47
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402b30
sub eax, edx
sar eax, 1
test eax, eax
jl 0x402d60
cmp eax, dword [edi - 8]
jg 0x402d60
mov dword [edi - 0xc], eax
mov word [edi + eax*2], 0
movzx edx, word [esp + 0x82]
movzx ecx, word [esp + 0x84]
mov eax, dword [ebx - 8]
add esi, edx
shr ecx, 1
mov edx, 1
sub edx, dword [ebx - 4]
sub eax, ecx
or eax, edx
jge 0x402b8b
lea eax, [esp + 0x18]
call fcn.00404d50
mov ebx, dword [esp + 0x18]
movzx eax, word [esp + 0x84]
push eax
lea eax, [esp + 0x9a]
add eax, esi
push eax
push ebx
call fcn.00483140
movzx eax, word [esp + 0x90]
shr eax, 1
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402bd2
test ebx, ebx
jne 0x402bbe
xor eax, eax
jmp 0x402bda
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402bc3
sub eax, edx
sar eax, 1
test eax, eax
jl 0x402d60
cmp eax, dword [ebx - 8]
jg 0x402d60
mov dword [ebx - 0xc], eax
push 0x3c
mov word [ebx + eax*2], 0
call fcn.0047f14d
mov esi, eax
add esp, 4
test esi, esi
je 0x402cca
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
lea edi, [esi + 0x1c]
call eax
add eax, 0x10
mov dword [edi], eax
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
lea ebx, [esi + 0x20]
call eax
add eax, 0x10
mov dword [ebx], eax
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
lea ebp, [esi + 0x24]
call eax
add eax, 0x10
mov dword [ebp], eax
movzx ecx, byte [esp + 0x78]
mov eax, dword [esp + 0x1c]
shr ecx, 1
and ecx, 1
mov dword [esi], ecx
mov edx, dword [esp + 0x7c]
mov dword [esi + 4], edx
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x86]
mov dword [esi + 0xc], ecx
mov edx, dword [esp + 0x8a]
mov dword [esi + 0x10], edx
mov eax, dword [esp + 0x8e]
mov dword [esi + 0x14], eax
mov ecx, dword [esp + 0x92]
lea eax, [esp + 0x28]
mov dword [esp + 0x30], esi
mov dword [esi + 0x18], ecx
call fcn.00403b10
lea eax, [esp + 0x18]
mov edi, ebx
call fcn.00403b10
lea eax, [esp + 0x24]
mov edi, ebp
call fcn.00403b10
mov esi, dword [esp + 0x2c]
add esi, 0x24
lea ebx, [esp + 0x30]
call fcn.00403a50
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x74]
add dword [esp + 0x1c], edx
add ebx, 0xfffffff0
mov byte [esp + 0x1084], 2
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402cf6
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add edi, 0xfffffff0
mov byte [esp + 0x1084], 1
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402d1a
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
add ebp, 0xfffffff0
mov byte [esp + 0x1084], 0
lea eax, [ebp + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402d3f
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebp
call eax
mov ebx, dword [esp + 0x20]
xor esi, esi
push 0x1000
lea ecx, [esp + 0x78]
push esi
push ecx
call fcn.00485090
mov ebp, dword [0x4a7310]
jmp 0x402962
push 0x80070057
call fcn.00404ef0
cmp ebx, esi
je 0x402d75
push ebx
call dword [0x4a7260]
mov eax, 1
mov ecx, dword [esp + 0x107c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1060]
xor ecx, esp
call fcn.0047f0e0
add esp, 0x1074
ret 4