Function at 0x4039f0
Capabilities:
Create thread
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e08e
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x49f56c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x6c], 0
mov eax, dword [ebp - 0x70]
mov dword [eax + 0x88], 0
call fcn.0040b480
mov dword [ebp - 0x18], eax
mov byte [ebp - 0xd], 0
lea ecx, [ebp - 0x14]
call fcn.004028e0
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x18]
call fcn.00402190
movzx ecx, al
test ecx, ecx
je 0x403b2c
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x18]
add eax, 0xd8
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x78], edx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x78]
call fcn.0041a040
push eax
call fcn.00450f20
add esp, 4
mov byte [ebp - 0x21], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.004029a0
movzx eax, byte [ebp - 0x21]
test eax, eax
je 0x403ac3
mov ecx, dword [ebp - 0x18]
add ecx, 0xd8
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401c20
mov byte [ebp - 0xd], 1
jmp 0x403b27
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x18]
add eax, 0xdc
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0x7c], eax
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x80], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x80]
call fcn.0041a040
push eax
call fcn.00450f20
add esp, 4
mov byte [ebp - 0x29], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x30]
call fcn.004029a0
movzx eax, byte [ebp - 0x29]
test eax, eax
je 0x403b27
mov ecx, dword [ebp - 0x18]
add ecx, 0xdc
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401c20
mov byte [ebp - 0xd], 1
jmp 0x403ec6
mov edx, dword [ebp + 0x18]
push edx
push 0x485838
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x18]
add ecx, 0xd8
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x88], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x6c]
or ecx, 1
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x88]
push edx
lea eax, [ebp - 0x3c]
push eax
call fcn.004020e0
add esp, 0xc
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x90], ecx
mov dword [ebp - 4], 4
mov edx, dword [ebp - 0x6c]
or edx, 2
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x90]
push eax
lea ecx, [ebp - 0x40]
push ecx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0x94], eax
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x98], edx
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x6c]
or eax, 4
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x98]
call fcn.0041a040
push eax
call fcn.00450f20
add esp, 4
movzx ecx, al
test ecx, ecx
je 0x403c55
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x18]
add eax, 0xd8
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0x9c], eax
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], edx
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x6c]
or eax, 8
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0xa0]
call fcn.0041a040
push eax
call fcn.00450f20
add esp, 4
movzx ecx, al
test ecx, ecx
je 0x403c55
mov dword [ebp - 0xa4], 1
jmp 0x403c5f
mov dword [ebp - 0xa4], 0
mov dl, byte [ebp - 0xa4]
mov byte [ebp - 0x31], dl
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x6c]
and eax, 8
je 0x403c83
and dword [ebp - 0x6c], 0xfffffff7
lea ecx, [ebp - 0x44]
call fcn.004029a0
mov dword [ebp - 4], 4
mov ecx, dword [ebp - 0x6c]
and ecx, 4
je 0x403c9e
and dword [ebp - 0x6c], 0xfffffffb
lea ecx, [ebp - 0x40]
call fcn.004029a0
mov dword [ebp - 4], 3
mov edx, dword [ebp - 0x6c]
and edx, 2
je 0x403cb9
and dword [ebp - 0x6c], 0xfffffffd
lea ecx, [ebp - 0x3c]
call fcn.004029a0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x6c]
and eax, 1
je 0x403cd4
and dword [ebp - 0x6c], 0xfffffffe
lea ecx, [ebp - 0x38]
call fcn.004029a0
movzx ecx, byte [ebp - 0x31]
test ecx, ecx
je 0x403cf7
mov edx, dword [ebp - 0x18]
add edx, 0xd8
push edx
lea ecx, [ebp - 0x14]
call fcn.00401c20
mov byte [ebp - 0xd], 1
jmp 0x403ec6
mov eax, dword [ebp + 0x18]
push eax
push 0x48583c
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0x18]
add edx, 0xdc
push edx
lea eax, [ebp - 0x4c]
push eax
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0xa8], eax
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0xac], ecx
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x6c]
or edx, 0x10
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0xac]
push eax
lea ecx, [ebp - 0x50]
push ecx
call fcn.004020e0
add esp, 0xc
mov dword [ebp - 0xb0], eax
mov edx, dword [ebp - 0xb0]
mov dword [ebp - 0xb4], edx
mov dword [ebp - 4], 8
mov eax, dword [ebp - 0x6c]
or eax, 0x20
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0xb4]
push ecx
lea edx, [ebp - 0x54]
push edx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0xb8]
mov dword [ebp - 0xbc], eax
mov dword [ebp - 4], 9
mov ecx, dword [ebp - 0x6c]
or ecx, 0x40
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0xbc]
call fcn.0041a040
push eax
call fcn.00450f20
add esp, 4
movzx edx, al
test edx, edx
je 0x403e24
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x18]
add ecx, 0xdc
push ecx
lea edx, [ebp - 0x58]
push edx
call fcn.00402030
add esp, 0xc
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 0xa
mov ecx, dword [ebp - 0x6c]
or ecx, 0x80
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0xc4]
call fcn.0041a040
push eax
call fcn.00450f20
add esp, 4
movzx edx, al
test edx, edx
je 0x403e24
mov dword [ebp - 0xc8], 1
jmp 0x403e2e
mov dword [ebp - 0xc8], 0
mov al, byte [ebp - 0xc8]
mov byte [ebp - 0x45], al
mov dword [ebp - 4], 9
mov ecx, dword [ebp - 0x6c]
and ecx, 0x80
je 0x403e58
and dword [ebp - 0x6c], 0xffffff7f
lea ecx, [ebp - 0x58]
call fcn.004029a0
mov dword [ebp - 4], 8
mov edx, dword [ebp - 0x6c]
and edx, 0x40
je 0x403e73
and dword [ebp - 0x6c], 0xffffffbf
lea ecx, [ebp - 0x54]
call fcn.004029a0
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x6c]
and eax, 0x20
je 0x403e8e
and dword [ebp - 0x6c], 0xffffffdf
lea ecx, [ebp - 0x50]
call fcn.004029a0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x6c]
and ecx, 0x10
je 0x403ea9
and dword [ebp - 0x6c], 0xffffffef
lea ecx, [ebp - 0x4c]
call fcn.004029a0
movzx edx, byte [ebp - 0x45]
test edx, edx
je 0x403ec6
mov eax, dword [ebp - 0x18]
add eax, 0xdc
push eax
lea ecx, [ebp - 0x14]
call fcn.00401c20
mov byte [ebp - 0xd], 1
movzx ecx, byte [ebp - 0xd]
test ecx, ecx
je 0x404061
mov edx, dword [ebp + 0x14]
push edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x1c]
push ecx
call fcn.00402030
add esp, 0xc
mov byte [ebp - 4], 0xb
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocStringLen
lea ecx, [ebp - 0x1c]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [ebp - 0x70]
mov dword [edx + 0xb0], eax
mov eax, dword [ebp - 0x70]
cmp dword [eax + 0xb0], 0xffffffff
jne 0x403f3f
mov ecx, dword [ebp - 0x70]
mov dword [ecx + 0xb0], 0
mov edx, dword [ebp - 0x70]
mov dword [edx + 0x88], 0
jmp 0x404055
push 0
mov eax, dword [ebp - 0x70]
mov ecx, dword [eax + 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp - 0x70]
mov dword [edx + 0x88], eax
cmp dword [ebp + 0x1c], 0
je 0x403f9d
mov eax, dword [ebp - 0x70]
mov ecx, dword [eax + 0x88]
cmp ecx, dword [ebp + 0x1c]
je 0x403f9d
mov edx, dword [ebp - 0x70]
mov dword [edx + 0x88], 0
mov eax, dword [ebp - 0x70]
mov ecx, dword [eax + 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x70]
mov dword [edx + 0xb0], 0
jmp 0x404055
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x70]
add ecx, 0xb4
call fcn.00401c20
push 0x2e
lea ecx, [ebp - 0x1c]
call fcn.0041a040
push eax
call fcn.00464827
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x40402f
mov ecx, dword [ebp - 0x20]
add ecx, 2
push ecx
mov ecx, dword [ebp - 0x70]
add ecx, 0x94
call fcn.004029f0
mov edx, dword [ebp - 0x70]
add edx, 0x94
push edx
lea eax, [ebp - 0x5c]
push eax
call fcn.00455480
add esp, 8
mov dword [ebp - 0xcc], eax
mov ecx, dword [ebp - 0xcc]
mov dword [ebp - 0xd0], ecx
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0xd0]
push edx
mov ecx, dword [ebp - 0x70]
add ecx, 0x98
call fcn.00401c20
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x5c]
call fcn.004029a0
jmp 0x404055
push 0x485840
mov ecx, dword [ebp - 0x70]
add ecx, 0x94
call fcn.004029f0
push 0x485848
mov ecx, dword [ebp - 0x70]
add ecx, 0x98
call fcn.004029f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.004029a0
mov eax, dword [ebp - 0x70]
cmp dword [eax + 0x88], 0
jbe 0x404177
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x70]
add ecx, 0x90
call fcn.004051f0
cmp dword [ebp + 0xc], 0
je 0x404098
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp - 0x70]
add ecx, 0x24
call fcn.0042a3e0
cmp dword [ebp + 0x10], 0
je 0x4040c4
mov eax, dword [ebp - 0x70]
mov dword [eax + 0x28], 0x54
mov ecx, dword [ebp - 0x70]
add ecx, 0x28
push ecx
mov edx, dword [ebp - 0x70]
add edx, 0x7c
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ecx + 0xc]
call eax
push 0x48
call fcn.0046461b
add esp, 4
mov dword [ebp - 0x64], eax
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0x64], 0
je 0x4040f0
push 0x400
mov ecx, dword [ebp - 0x64]
call fcn.00404b20
mov dword [ebp - 0xd4], eax
jmp 0x4040fa
mov dword [ebp - 0xd4], 0
mov ecx, dword [ebp - 0xd4]
mov dword [ebp - 0x60], ecx
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x60]
mov dword [edx + 0x80], eax
mov ecx, dword [ebp - 0x70]
push ecx
push 0x404560
mov edx, dword [ebp - 0x70]
mov ecx, dword [edx + 0x80]
call fcn.00404bf0
mov eax, dword [ebp - 0x70]
add eax, 0xac
push eax
push 0
mov ecx, dword [ebp - 0x70]
push ecx
push 0x4041a0
push 0
push 0
call fcn.00464955
add esp, 0x18
mov edx, dword [ebp - 0x70]
mov dword [edx + 0xa8], eax
mov eax, dword [ebp - 0x70]
cmp dword [eax + 0xa8], 0
je 0x404177
mov byte [ebp - 0x65], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004029a0
mov al, byte [ebp - 0x65]
jmp 0x40418d
mov byte [ebp - 0x66], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004029a0
mov al, byte [ebp - 0x66]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 0x18