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

Disassembly:
sub esp, 0x24
push ebx
mov ebx, eax
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x413493
pop ebx
add esp, 0x24
ret
push ebp
push 0
push 0x80
push 4
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4134bc
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push edi
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jne 0x4134e0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00416838
mov eax, 0xaaaaaaab
mul ebx
shr edx, 3
lea eax, [edx + edx*2]
add eax, eax
add eax, eax
mov esi, ebx
sub esi, eax
imul esi, esi, 0x2800
lea eax, [esi + edi]
push eax
mov dword [esp + 0x38], eax
call fcn.004161c2
add esp, 8
xor edi, edi
mov dword [esp + 0x14], eax
test esi, esi
jle 0x413545
mov ecx, dword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x24], eax
lea esp, [esp]
call fcn.0041684a
mov edx, dword [esp + 0x24]
mov byte [edx + edi], al
inc edi
cmp edi, esi
jl 0x413530
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
push ebp
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41356c
mov edx, dword [esp + 0x14]
push edx
jmp 0x413577
cmp dword [esp + 0x1c], esi
je 0x413590
mov eax, dword [esp + 0x14]
push eax
call fcn.004160ce
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp + 0x3c]
movzx esi, word [eax + ebp + 6]
movzx ecx, word [eax + ebp + 0x14]
add eax, ebp
cmp esi, 1
lea edi, [ecx + eax + 0x18]
jle 0x4136b1
mov eax, 0xcccccccd
mul ebx
shr edx, 4
lea edx, [edx + edx*4]
add edx, edx
add edx, edx
mov eax, ebx
sub eax, edx
mov dword [esp + 0x18], eax
mov eax, 0x4ec4ec4f
mul ebx
shr edx, 2
imul edx, edx, 0xd
mov eax, ebx
sub eax, edx
mov dword [esp + 0x14], eax
mov eax, 0xaf286bcb
mul ebx
mov eax, ebx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 4
mov edx, eax
imul edx, edx, 0x13
mov eax, ebx
sub eax, edx
mov dword [esp + 0x28], eax
mov al, bl
and al, 7
add al, 0x63
mov byte [esp + 0x13], al
mov eax, 0xcccccccd
mul ebx
shr edx, 2
lea edx, [edx + edx*4]
mov eax, ebx
sub eax, edx
mov dword [esp + 0x2c], eax
mov eax, 0xf0f0f0f1
mul ebx
shr edx, 4
mov eax, edx
shl eax, 4
add eax, edx
mov edx, eax
mov eax, ebx
sub eax, edx
mov dword [esp + 0x24], eax
mov eax, 0xba2e8ba3
mul ebx
shr edx, 3
imul edx, edx, 0xb
mov cl, bl
and cl, 0xf
add cl, 0x69
sub ebx, edx
lea eax, [edi + 0x2a]
dec esi
lea esp, [esp]
movzx edx, byte [esp + 0x18]
add dl, 0x63
mov byte [eax - 2], dl
movzx edx, byte [esp + 0x14]
add dl, 0x65
mov byte [eax - 1], dl
movzx edx, byte [esp + 0x28]
add dl, 0x61
mov byte [eax + 1], dl
movzx edx, byte [esp + 0x13]
mov byte [eax + 2], dl
movzx edx, byte [esp + 0x2c]
add dl, 0x6a
mov byte [eax + 3], dl
movzx edx, byte [esp + 0x24]
add dl, 0x6c
mov byte [eax + 4], dl
mov dl, bl
add dl, 0x6d
mov byte [eax], cl
mov byte [eax + 5], dl
add eax, 0x28
sub esi, 1
jne 0x413660
mov eax, dword [esp + 0x38]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4136e8
push ebp
call fcn.004160ce
add esp, 4
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov edi, dword [esp + 0x30]
push 0
lea ecx, [esp + 0x24]
push ecx
push edi
push ebp
push esi
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
test eax, eax
jne 0x413722
call fcn.004160ce
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
cmp edi, dword [esp + 0x24]
jne 0x413709
call fcn.004160ce
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret