Function at 0x47fde0
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50bae5
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x54b144]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x64], eax
mov esi, dword [eax + 0x20]
lea ebx, [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x20]
mov esi, dword [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub edi, esi
cmp edi, 4
jb 0x4800fd
push 0xe
mov dword [ebp - 0x38], 0
lea ecx, [ebp - 0x38]
push str.dr_padcket.dat
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
call fcn.0044c030
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00480120
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x24]
cmp edx, 0x10
jb 0x47fea9
mov ecx, dword [ebp - 0x38]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x47fe9f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x480119
push edx
push ecx
call fcn.004dafca
add esp, 8
cmp dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x50]
push 0
cmovae eax, dword [ebp - 0x50]
push 0x80
push 4
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4800cd
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x54], eax
cmp eax, 0x100000
jbe 0x47fef7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4800cd
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xf023
call fcn.004daf9a
add esp, 4
test eax, eax
je 0x480119
lea edi, [eax + 0x23]
and edi, 0xffffffe0
push 0xf000
push 0
push edi
mov dword [ebp - 0x70], edi
mov dword [edi - 4], eax
call fcn.004dcc10
add esp, 0xc
push 0
call fcn.004e4842
mov dword [ebp - 0x6c], eax
add esp, 4
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x68], edx
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x5c], eax
add eax, 4
push eax
mov dword [ebp - 0x58], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x5c]
xor esi, esi
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x20]
cmp ecx, edx
je 0x47ff83
mov esi, dword [ecx]
lea eax, [ecx + 4]
sub edx, eax
push edx
push eax
push ecx
call fcn.004dc690
mov eax, dword [ebp - 0x5c]
add esp, 0xc
add dword [eax + 0x20], 0xfffffffc
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x4800ab
cmp dword [esi + 0xc], 0
je 0x480053
mov edx, dword [esi]
mov ecx, edx
mov eax, dword [esi + 4]
add ecx, 0x15180
mov dword [ebp - 0x58], eax
adc eax, 0
cmp dword [ebp - 0x68], eax
jg 0x480053
jl 0x47ffc5
cmp dword [ebp - 0x6c], ecx
jae 0x480053
mov eax, dword [ebp - 0x58]
lea ecx, [esi + 0x14]
mov dword [ebp - 0x1c], eax
lea eax, [edi + 0xf000]
sub eax, edi
mov dword [ebp - 0x20], edx
dec eax
mov word [ebp - 0x14], ax
movzx eax, word [esi + 0x40]
mov word [ebp - 0x18], ax
movzx eax, word [esi + 0x48]
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.0047e980
test al, al
je 0x480053
push 0
lea eax, [ebp - 0x60]
push eax
push 0x10
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esi + 0x44], 0x10
lea ecx, [esi + 0x30]
jb 0x48001a
mov ecx, dword [ecx]
push 0
lea eax, [ebp - 0x60]
push eax
movzx eax, word [ebp - 0x18]
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x60]
push eax
movzx eax, word [ebp - 0x14]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
movzx edx, word [ebp - 0x18]
movzx eax, word [ebp - 0x14]
add edx, 0x10
add eax, dword [ebp - 0x54]
add eax, edx
mov dword [ebp - 0x54], eax
push ecx
mov ecx, esi
call fcn.0047dc70
cmp dword [ebp - 0x54], 0x100000
ja 0x4800ab
mov eax, dword [ebp - 0x64]
mov edi, dword [eax + 0x20]
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x1c]
xor esi, esi
mov ecx, dword [edi + 0x20]
cmp eax, ecx
je 0x480096
mov esi, dword [eax]
lea edx, [eax + 4]
sub ecx, edx
push ecx
push edx
push eax
call fcn.004dc690
add esp, 0xc
add dword [edi + 0x20], 0xfffffffc
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 0x70]
test esi, esi
jne 0x47ff94
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi - 4]
sub edi, ecx
lea eax, [edi - 4]
cmp eax, 0x1f
ja 0x480119
push 0xf023
push ecx
call fcn.004dafca
add esp, 8
mov edx, dword [ebp - 0x3c]
cmp edx, 0x10
jb 0x4800fd
mov ecx, dword [ebp - 0x50]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4800f3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x480119
push edx
push ecx
call fcn.004dafca
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004dafe6
mov esp, ebp
pop ebp
ret
call fcn.004e002c
int3