Function at 0x407880
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4565d8
push 0x44bffc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2a4
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor edi, edi
mov dword [ebp - 0x290], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x298], 0xffffffff
mov dword [ebp - 0x58], edi
mov dword [ebp - 4], edi
push 0x7f02
push edi
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push edi
push edi
push 0x184
mov eax, dword [0x477450]
push eax
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
call esi
push edi
push edi
push 0xb
mov ecx, dword [0x477450]
push ecx
call esi
lea edx, [ebp - 0x284]
push edx
call dword [sym.imp.USER32.dll_GetCursorPos]
push 1
lea eax, [ebp - 0x284]
push eax
mov ecx, dword [0x4773cc]
push ecx
push edi
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov edx, dword [ebp - 0x280]
and edx, 0xffff
shl edx, 0x10
mov eax, dword [ebp - 0x284]
and eax, 0xffff
or edx, eax
push edx
push edi
push 0x1a9
mov ecx, dword [0x4773cc]
push ecx
call esi
mov ebx, eax
and ebx, 0xffff
mov dword [ebp - 0x29c], ebx
push edi
push ebx
push 0x199
mov edx, dword [0x4773cc]
push edx
call esi
mov dword [ebp - 0x294], eax
mov ecx, eax
and ecx, 0x1f0000
cmp ecx, 0x40000
jae 0x407994
test eax, 0xe00000
jbe 0x407994
mov eax, 1
jmp 0x407996
xor eax, eax
cmp eax, edi
je 0x407a14
lea edi, [ebx - 1]
mov dword [ebp - 0x2a4], edi
test edi, edi
jl 0x4079f4
push 0
push edi
push 0x199
mov edx, dword [0x4773cc]
push edx
call esi
and eax, 0x1f0000
cmp eax, 0x50000
je 0x4079e4
push 0
push edi
push 0x199
mov eax, dword [0x4773cc]
push eax
call esi
and eax, 0x1f0000
cmp eax, 0x70000
je 0x4079e4
xor eax, eax
jmp 0x4079e9
mov eax, 1
test eax, eax
je 0x4079f1
mov ebx, edi
jmp 0x4079f7
dec edi
jmp 0x40799d
or ebx, 0xffffffff
mov dword [ebp - 0x29c], ebx
push 0
push ebx
push 0x199
mov ecx, dword [0x4773cc]
push ecx
call esi
mov dword [ebp - 0x294], eax
mov edx, dword [ebp + 8]
cmp edx, dword [0x4773dc]
jne 0x407b3e
lea eax, [ebp - 0x260]
push eax
push ebx
push 0x189
mov ecx, dword [0x4773cc]
push ecx
call esi
push 0x104
lea edx, [ebp - 0x15c]
push edx
push 0x3c
mov eax, dword [0x4773fc]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [ebp - 0x15c]
mov dword [ebp - 0x2b4], ecx
lea edx, [ebp - 0x260]
mov edi, 0x45a1c0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x2b4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x40], 0x28
mov eax, dword [0x477358]
mov dword [ebp - 0x3c], eax
mov ecx, dword [0x477340]
mov dword [ebp - 0x38], ecx
lea edx, [ebp - 0x260]
mov dword [ebp - 0x34], edx
mov eax, dword [0x477404]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 0x4041
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xc350
mov dword [ebp - 0x20], 0x40a260
mov dword [ebp - 0x1c], 0x400
lea ecx, [ebp - 0x40]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxIndirectA]
cmp eax, 2
jne 0x407b32
mov dword [ebp - 4], 0xffffffff
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [ebp - 0x29c]
push 0
push 0
push 0x190
mov edx, dword [0x4773cc]
push edx
call esi
mov edi, eax
mov dword [ebp - 0x27c], edi
test edi, edi
je 0x407c7c
lea eax, [edi*4]
push eax
call fcn.0044c0d4
add esp, 4
mov dword [ebp - 0x264], eax
push eax
push edi
push 0x191
mov ecx, dword [0x4773cc]
push ecx
call esi
push 0
mov edx, dword [ebp - 0x264]
mov eax, dword [edx]
push eax
push 0x199
mov ecx, dword [0x4773cc]
push ecx
call esi
mov dword [ebp - 0x28c], eax
mov edx, eax
and edx, 0x1f0000
cmp edx, 0x40000
jae 0x407bc3
test eax, 0xe00000
jbe 0x407bc3
mov eax, 1
jmp 0x407bc5
xor eax, eax
test eax, eax
je 0x407c6d
mov eax, dword [ebp - 0x264]
mov eax, dword [eax]
mov dword [ebp - 0x2ac], eax
lea edi, [eax - 1]
mov dword [ebp - 0x2a8], edi
test edi, edi
jl 0x407c32
push 0
push edi
push 0x199
mov ecx, dword [0x4773cc]
push ecx
call esi
and eax, 0x1f0000
cmp eax, 0x50000
je 0x407c26
push 0
push edi
push 0x199
mov edx, dword [0x4773cc]
push edx
call esi
and eax, 0x1f0000
cmp eax, 0x70000
je 0x407c26
xor eax, eax
jmp 0x407c2b
mov eax, 1
test eax, eax
jne 0x407c35
dec edi
jmp 0x407bde
or edi, 0xffffffff
mov dword [ebp - 0x2b0], edi
cmp edi, ebx
jne 0x407c6d
mov eax, dword [ebp - 0x264]
push eax
call fcn.0044c186
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x264]
push ecx
call fcn.0044c186
add esp, 4
mov eax, dword [ebp - 0x294]
and eax, 0x1f0000
cmp eax, 0x50000
je 0x407c99
cmp eax, 0x70000
je 0x407c99
xor eax, eax
jmp 0x407c9e
mov eax, 1
test eax, eax
je 0x407cac
mov dword [ebp - 0x290], 1
lea edx, [ebp - 0x15c]
push edx
push ebx
push 0x189
mov eax, dword [0x4773cc]
push eax
call esi
lea ecx, [ebp - 0x268]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004081f0
mov edi, eax
mov dword [ebp - 0x48], edi
test edi, edi
je 0x408146
mov eax, dword [ebp - 0x268]
test eax, eax
je 0x408146
lea eax, [ebp - 0x15c]
push eax
push 0xffffffffffffffff
push 0x1a2
mov ecx, dword [0x4773dc]
push ecx
call esi
mov edi, eax
mov dword [ebp - 0x27c], edi
cmp edi, 0xffffffff
je 0x407d96
push 0
push 0
push 0x2aff
mov edx, dword [0x4773dc]
push edx
call esi
cmp edi, eax
jge 0x407d96
mov ebx, 1
mov dword [ebp - 0x4c], ebx
push 0
push 0
push 0xb
mov eax, dword [0x4773dc]
push eax
call esi
push 0
push edi
push 0x199
mov ecx, dword [0x4773dc]
push ecx
call esi
mov esi, eax
mov dword [ebp - 0x28c], esi
and eax, 0x1f0000
cmp eax, 0x50000
je 0x407d70
cmp eax, 0x70000
je 0x407d70
xor eax, eax
jmp 0x407d72
mov eax, ebx
test eax, eax
je 0x407d89
mov dword [ebp - 0x270], ebx
push edi
mov edx, dword [0x4773dc]
push edx
call fcn.004087a0
shr esi, 0x10
and esi, 0x1f
push esi
push edi
call fcn.0040b730
push 0
push 1
push 3
push 1
push 0x80000000
lea eax, [ebp - 0x15c]
push eax
call fcn.0044a650
mov dword [ebp - 0x298], eax
cmp eax, 0xffffffff
je 0x407e54
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [ebp - 0x268]
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
add esi, edx
mov dword [ebp - 0x274], esi
push esi
call fcn.0044c0d4
add esp, 4
mov ebx, eax
mov dword [ebp - 0x58], ebx
mov ecx, esi
xor eax, eax
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
push 0
lea eax, [ebp - 0x294]
push eax
push esi
push ebx
mov ecx, dword [ebp - 0x298]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, ebx
mov dword [ebp - 0x44], esi
lea edi, [ebx + 0x155]
mov ecx, edi
mov dword [ebp - 0x278], ecx
mov eax, dword [ebx + 4]
lea edx, [eax + eax*8]
lea ecx, [ecx + edx*4]
add ecx, eax
mov dword [ebp - 0x278], ecx
mov edx, dword [ebp - 0x298]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x298], 0xffffffff
jmp 0x407e9d
mov eax, dword [ebp - 0x268]
lea ecx, [eax + eax*8]
lea esi, [eax + ecx*4 + 0x155]
mov dword [ebp - 0x274], esi
push esi
call fcn.0044c0d4
add esp, 4
mov ebx, eax
mov dword [ebp - 0x58], ebx
mov ecx, esi
xor eax, eax
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov esi, ebx
mov dword [ebp - 0x44], esi
lea edi, [ebx + 0x155]
mov dword [ebp - 0x278], edi
mov dword [ebx], 0x20000
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x27c], 0
mov eax, dword [ebp - 0x27c]
cmp eax, dword [ebp - 0x268]
jge 0x407f81
mov ecx, dword [ebp - 0x48]
mov edx, eax
mov eax, dword [ecx + edx*4]
push eax
call fcn.00432ed0
mov edi, eax
mov dword [ebp - 0x26c], edi
test edi, edi
je 0x407f70
mov dword [ebp - 0x288], 1
xor ecx, ecx
mov dword [ebp - 0x294], ecx
cmp ecx, dword [esi + 4]
jae 0x407f1f
lea edx, [ecx + ecx*8]
mov eax, dword [ebp - 0x50]
add eax, ecx
lea eax, [eax + edx*4]
mov dword [ebp - 0x54], eax
mov edx, dword [eax + 0x20]
cmp edx, dword [edi + 0x2a]
jne 0x407f7b
mov al, byte [eax + 0x24]
cmp al, byte [edi + 0x22]
jne 0x407f7b
mov dword [ebp - 0x288], 0
mov eax, dword [ebp - 0x288]
test eax, eax
je 0x407f70
add edi, 2
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov eax, dword [ebp - 0x278]
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x26c]
mov ecx, dword [esi + 0x2a]
mov dword [eax + 0x20], ecx
mov dl, byte [esi + 0x22]
mov byte [eax + 0x24], dl
add eax, 0x25
mov dword [ebp - 0x278], eax
mov esi, dword [ebp - 0x44]
inc dword [esi + 4]
inc dword [ebp - 0x27c]
jmp 0x407eb0
inc ecx
jmp 0x407eec
lea eax, [ebx + 0x155]
mov dword [ebp - 0x278], eax
push 0x408770
push 0x25
mov ecx, dword [esi + 4]
push ecx
push eax
call fcn.0044c1ef
add esp, 0x10
lea edx, [esi + 0x11]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x407fdb
mov eax, dword [0x477368]
neg eax
sbb eax, eax
and al, 0xf7
add eax, 0x1010
mov dword [ebp - 0x27c], eax
push 0x40
push edx
push 0x464964
push 0x45a1b0
push eax
call fcn.00440750
push 1
push 1
push 2
push 2
push 0x40000000
lea edx, [ebp - 0x15c]
push edx
call fcn.0044a650
mov edi, eax
mov dword [ebp - 0x298], edi
mov esi, dword [esi + 4]
lea eax, [esi + esi*8]
lea esi, [esi + eax*4 + 0x155]
mov dword [ebp - 0x274], esi
push 0
lea ecx, [ebp - 0x294]
push ecx
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x298], 0xffffffff
test ebx, ebx
je 0x40803f
push ebx
call fcn.0044c186
add esp, 4
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40804f
push eax
call fcn.0044c186
add esp, 4
push 0xffffffffffffffff
push 0
push 0x185
mov edx, dword [ebp + 8]
push edx
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
call esi
mov ebx, dword [ebp - 0x29c]
push ebx
push 1
push 0x185
mov eax, dword [0x4773cc]
push eax
call esi
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4080d7
push 4
lea ecx, [ebp - 0x15c]
push ecx
call fcn.0040b9b0
mov edi, eax
mov dword [ebp - 0x27c], edi
push 4
lea edx, [ebp - 0x15c]
push edx
call fcn.0043ab30
mov eax, dword [ebp - 0x270]
test eax, eax
je 0x4080bb
push edi
mov eax, dword [0x4773dc]
push eax
call fcn.00408870
push 0
push 1
push 0xb
mov ecx, dword [0x4773dc]
push ecx
call esi
mov edx, dword [0x4773dc]
push edx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x4080ed
push ebx
mov eax, dword [0x4773cc]
push eax
call fcn.004087a0
push ebx
mov ecx, dword [0x4773cc]
push ecx
call fcn.00408870
call fcn.0040be90
call fcn.004365e0
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 0
push 1
push 0xb
mov edx, dword [0x477450]
push edx
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], 0xffffffff
jmp 0x40817a
mov eax, dword [ebp - 0x298]
cmp eax, 0xffffffff
je 0x40818c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40819c
push eax
call fcn.0044c186
add esp, 4
test edi, edi
je 0x4081a9
push edi
call fcn.0044c186
add esp, 4
push 0
push 1
push 0xb
mov edx, dword [0x4773cc]
push edx
call esi
push 1
push 0
mov eax, dword [0x4773cc]
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
push 0
push 1
push 0xb
mov ecx, dword [0x477450]
push ecx
call esi
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4