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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4461d1
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x2c0
mov eax, dword [0x459020]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2b8], ecx
xor edi, edi
lea eax, [ebp - 0x120]
push 0x104
push edi
push eax
mov dword [ebp - 0x2cc], edi
call fcn.004259e0
add esp, 0xc
lea eax, [ebp - 0x120]
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x190], edi
mov dword [ebp - 0x180], edi
lea edx, [ecx + 1]
mov dword [ebp - 0x17c], 0xf
mov byte [ebp - 0x190], 0
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x420eb0
sub ecx, edx
lea eax, [ebp - 0x120]
push ecx
push eax
lea ecx, [ebp - 0x190]
call fcn.004018a0
push str.002.dat
lea ecx, [ebp - 0x190]
mov dword [ebp - 4], 0
call fcn.004023f0
cmp dword [ebp - 0x17c], 0x10
lea eax, [ebp - 0x190]
push 0
cmovae eax, dword [ebp - 0x190]
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2ac], eax
cmp eax, 0xffffffff
je 0x421630
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.00424367
add esp, 4
mov dword [ebp - 0x2c8], eax
lea ecx, [ebp - 0x15c]
mov dword [ebp - 0x15c], 0
push 0
push ecx
push esi
push eax
push dword [ebp - 0x2ac]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x2ac]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 0xa8
jne 0x421630
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x148], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x144], 0xf
mov byte [ebp - 0x158], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x420fa0
sub ecx, edx
lea eax, [ebp - 0x120]
push ecx
push eax
lea ecx, [ebp - 0x158]
call fcn.004018a0
push str.001.dat
lea ecx, [ebp - 0x158]
mov byte [ebp - 4], 1
call fcn.004023f0
cmp dword [ebp - 0x144], 0x10
lea eax, [ebp - 0x158]
push 0
cmovae eax, dword [ebp - 0x158]
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
mov dword [ebp - 0x2bc], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor esi, esi
mov dword [ebp - 0x2ac], eax
cmp eax, 0xffffffff
je 0x42105a
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.00424367
add esp, 4
mov dword [ebp - 0x2bc], eax
lea ecx, [ebp - 0x160]
mov dword [ebp - 0x160], 0
push 0
push ecx
push esi
push eax
push dword [ebp - 0x2ac]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x2ac]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x2c8]
lea ecx, [edx + 4]
mov dword [ebp - 0x2ac], ecx
mov eax, dword [edx + 0x94]
add eax, dword [edx + 0x7c]
add eax, dword [edx + 0x64]
add eax, dword [edx + 0x4c]
add eax, dword [edx + 0x34]
add eax, dword [edx + 0x1c]
add eax, dword [ecx]
cmp eax, esi
jne 0x4215db
mov edx, 0x15
lea ecx, [ebp - 0x1a8]
call fcn.00411db0
xor ecx, ecx
mov byte [ebp - 4], 2
cmp dword [ebp - 0x194], 0x10
mov dword [ebp - 0x2b0], ecx
setae byte [ebp - 0x2b1]
mov dword [ebp - 0x2c0], ecx
mov eax, dword [ebp - 0x2ac]
lea edx, [ebp - 0x1a8]
cmp byte [ebp - 0x2b1], 0
lea ecx, [ebp - 0x2a8]
mov esi, dword [ebp - 0x1a8]
cmovne edx, esi
mov eax, dword [eax]
mov dword [ebp - 0x2cc], eax
lea esi, [eax - 0x10]
call fcn.00401ab0
mov eax, dword [ebp - 0x2b0]
mov ecx, dword [ebp - 0x2bc]
push esi
movups xmm0, xmmword [eax + ecx]
lea edx, [ecx + 0x10]
add edx, eax
lea ecx, [ebp - 0x2a8]
movups xmmword [ebp - 0x1b8], xmm0
call fcn.00402320
mov eax, dword [ebp - 0x2bc]
xor edx, edx
mov ecx, dword [ebp - 0x2b0]
add esp, 4
add eax, ecx
movzx eax, byte [eax + esi + 0xf]
sub esi, eax
cmp eax, 0x10
cmova esi, edx
mov dword [ebp - 0x2c4], esi
test esi, esi
je 0x421552
mov ecx, dword [ebp - 0x2b8]
or edi, 1
mov dword [ebp - 0x128], edi
mov eax, dword [ecx]
add eax, dword [ebp - 0x2c0]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov esi, dword [eax]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
lea ecx, [ebp - 0x178]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x421181
push esi
call fcn.00401430
jmp 0x4211b2
push 0
mov dword [ebp - 0x178], 0
push 0x45306c
mov dword [ebp - 0x168], 0
mov dword [ebp - 0x164], 0xf
mov byte [ebp - 0x178], 0
call fcn.004018a0
push 0
push 0
push 2
push 0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x178]
cmp dword [ebp - 0x164], 0x10
push 0
cmovae eax, dword [ebp - 0x178]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x421220
mov ecx, dword [ebp - 0x2b0]
lea eax, [ebp - 0x124]
push 0
push eax
push dword [ebp - 0x2c4]
mov eax, dword [ebp - 0x2bc]
add ecx, 0x10
add eax, ecx
mov dword [ebp - 0x124], 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x2b8]
mov ecx, dword [ebp - 0x2c0]
mov edx, dword [esi]
mov eax, edx
mov ecx, dword [edx + ecx]
cmp dword [ecx + 0x5c], 1
jne 0x4213a6
mov ecx, dword [ebp - 0x2b8]
xor esi, esi
mov edi, dword [ebp - 0x128]
mov dword [ebp - 0x124], esi
mov ecx, dword [ecx + 4]
sub ecx, edx
sar ecx, 3
test ecx, ecx
je 0x4213a0
nop dword [eax]
nop word [eax + eax]
mov ecx, dword [edx + esi*8]
cmp dword [ecx + 0x5c], 0x80
jne 0x42137f
mov esi, dword [ecx]
mov eax, 0x2aaaaaab
mov ecx, dword [ecx + 4]
or edi, 2
sub ecx, esi
imul ecx
lea ecx, [ebp - 0x140]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4212ab
push esi
call fcn.00401430
jmp 0x4212d5
push 0
push 0x45306c
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], 0xf
call fcn.004018a0
cmp dword [ebp - 0x12c], 0x10
lea eax, [ebp - 0x140]
push 0
cmovae eax, dword [ebp - 0x140]
push 0
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x42133f
mov ecx, dword [ebp - 0x2b0]
lea eax, [ebp - 0x128]
push 0
push eax
push dword [ebp - 0x2c4]
mov eax, dword [ebp - 0x2bc]
add ecx, 0x10
add eax, ecx
mov dword [ebp - 0x128], 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x421379
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x42136f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421684
push edx
push ecx
call fcn.00423b44
add esp, 8
mov esi, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x2b8]
inc esi
mov dword [ebp - 0x124], esi
mov eax, dword [ecx]
mov edx, eax
mov ecx, dword [ecx + 4]
sub ecx, eax
sar ecx, 3
cmp esi, ecx
jb 0x421270
mov esi, dword [ebp - 0x2b8]
mov ecx, dword [ebp - 0x2c0]
mov ecx, dword [ecx + eax]
cmp dword [ecx + 0x5c], 2
jne 0x42150e
mov ecx, dword [esi + 4]
xor edx, edx
sub ecx, eax
mov dword [ebp - 0x124], edx
sar ecx, 3
test ecx, ecx
je 0x42150e
nop dword [eax]
nop word [eax + eax]
mov ecx, dword [eax + edx*8]
cmp dword [ecx + 0x5c], 0x100
jne 0x4214ef
mov esi, dword [ecx]
mov eax, 0x2aaaaaab
mov ecx, dword [ecx + 4]
or edi, 4
sub ecx, esi
imul ecx
lea ecx, [ebp - 0x140]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x42141b
push esi
call fcn.00401430
jmp 0x421445
push 0
push 0x45306c
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], 0xf
call fcn.004018a0
cmp dword [ebp - 0x12c], 0x10
lea eax, [ebp - 0x140]
push 0
cmovae eax, dword [ebp - 0x140]
push 0
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4214af
mov ecx, dword [ebp - 0x2b0]
lea eax, [ebp - 0x128]
push 0
push eax
push dword [ebp - 0x2c4]
mov eax, dword [ebp - 0x2bc]
add ecx, 0x10
add eax, ecx
mov dword [ebp - 0x128], 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x12c]
cmp edx, 0x10
jb 0x4214e9
mov ecx, dword [ebp - 0x140]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4214df
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421684
push edx
push ecx
call fcn.00423b44
add esp, 8
mov edx, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x2b8]
inc edx
mov dword [ebp - 0x124], edx
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
sub ecx, eax
sar ecx, 3
cmp edx, ecx
jb 0x4213e0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x164]
cmp edx, 0x10
jb 0x42154c
mov ecx, dword [ebp - 0x178]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x421542
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421684
push edx
push ecx
call fcn.00423b44
add esp, 8
mov ecx, dword [ebp - 0x2b0]
mov eax, dword [ebp - 0x2c0]
add ecx, dword [ebp - 0x2cc]
add eax, 8
add dword [ebp - 0x2ac], 0x18
mov dword [ebp - 0x2b0], ecx
mov dword [ebp - 0x2c0], eax
cmp eax, 0x38
jl 0x4210b8
mov eax, dword [ebp - 0x2c8]
push eax
call fcn.00423d7f
mov eax, dword [ebp - 0x2bc]
add esp, 4
test eax, eax
je 0x42159f
push eax
call fcn.00423d7f
add esp, 4
mov eax, dword [ebp - 0x194]
cmp eax, 0x10
jb 0x4215db
mov edx, dword [ebp - 0x1a8]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x4215d1
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421684
push ecx
push edx
call fcn.00423b44
add esp, 8
mov edx, dword [ebp - 0x144]
cmp edx, 0x10
jb 0x421615
mov ecx, dword [ebp - 0x158]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x42160b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421684
push edx
push ecx
call fcn.00423b44
add esp, 8
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x144], 0xf
mov byte [ebp - 0x158], 0
mov edx, dword [ebp - 0x17c]
cmp edx, 0x10
jb 0x421666
mov ecx, dword [ebp - 0x190]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x42165c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x421684
push edx
push ecx
call fcn.00423b44
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00423b13
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0042823f
int3