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

Disassembly:
push ebp
mov ebp, esp
movzx ecx, byte [ebp + 0xc]
mov eax, dword [ebp + 8]
sub esp, 0x54
push ebx
mov ebx, ecx
imul ebx, ebx, 0x68
add ebx, eax
cmp dword [ebx + 0x1ac], 0xffffffff
push esi
push edi
jne 0x41d870
mov eax, 0x1e
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
movzx edx, byte [eax + 0x1925]
mov esi, dword [eax + ecx*4 + 0x1830]
mov edi, dword [ebx + 0x184]
inc ecx
mov dword [ebp - 0x40], edi
cmp edx, ecx
jne 0x41d89d
cmp byte [eax + 0x1926], 1
jne 0x41d89d
mov esi, dword [eax + 0x1958]
jmp 0x41d8a1
movzx esi, byte [esi + 0xd]
imul esi, edi
test esi, esi
jne 0x41d8b6
lea eax, [esi + 0x1f]
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
push edx
push ecx
call fcn.0041f3c0
xor ecx, ecx
push ecx
push edi
push edx
push eax
call fcn.005af0e0
push 0
mov dword [ebp - 0x24], edx
push 0
lea edx, [ebp - 0x24]
push edx
add ebx, 0x168
push eax
push ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ebx
call fcn.00444d10
add esp, 0x14
xor edx, edx
cmp eax, 0xffffffff
jne 0x41d906
lea eax, [edx + 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp - 0x28]
shl edi, 0xb
mov dword [ebp - 0x20], eax
mov eax, edi
div esi
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp + 0x14], edi
cmp edx, ecx
je 0x41d934
inc eax
imul eax, esi
mov dword [ebp + 0x14], eax
mov edi, eax
push edi
call fcn.004898a6
mov ebx, eax
add esp, 4
mov dword [ebp + 0xc], ebx
test ebx, ebx
jne 0x41d954
lea eax, [ebx + 0x21]
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push edi
push 0
push ebx
call fcn.005afd80
mov esi, dword [ebp + 0x1c]
add esp, 0xc
cmp dword [esi + 4], 0
mov dword [ebp - 0xc], 0
jb 0x41d977
ja 0x41d9a0
cmp dword [esi], 0
ja 0x41d9a0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
push ebx
mov dword [esi], eax
mov dword [esi + 4], ecx
call fcn.0048989b
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
mov esi, ecx
cmp byte [0x64440b], 2
je 0x41daf8
mov edx, dword [ebp + 0xc]
xor ebx, ebx
push edi
mov ecx, edi
mov eax, ebx
push ebx
push edx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], eax
call fcn.005afd80
mov edi, dword [esi]
mov esi, dword [esi + 4]
add esp, 0xc
sub edi, dword [ebp - 0x18]
sbb esi, dword [ebp - 0x14]
cmp esi, ebx
ja 0x41da18
jb 0x41d9e0
cmp edi, dword [ebp + 0x14]
jae 0x41da18
xor eax, eax
push eax
mov eax, dword [ebp - 0x40]
push eax
push esi
push edi
call fcn.005bd2c0
mov dword [ebp - 0x4c], ebx
or ecx, dword [ebp - 0x4c]
mov ebx, edx
mov edx, eax
je 0x41da00
add edx, 1
adc ebx, 0
mov ecx, dword [ebp - 0x40]
xor eax, eax
push eax
push ecx
push ebx
push edx
call fcn.005af0e0
mov ebx, eax
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x34], esi
jmp 0x41da1e
mov edi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
push 0
push 0
lea edx, [ebp - 0x1c]
push edx
push eax
push ecx
call fcn.00444d10
add esp, 0x14
cmp eax, 0xffffffff
je 0x41db11
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
push 0
push 0
lea edx, [ebp - 8]
push edx
mov edx, dword [ebp - 0x20]
push ebx
push esi
push eax
push ecx
push edx
call fcn.00445150
add esp, 0x20
test eax, eax
je 0x41db2d
mov eax, dword [ebp - 8]
add dword [ebp - 0x20], eax
mov ebx, dword [ebp + 0x18]
push 0
adc dword [ebp - 0x1c], 0
lea ecx, [ebp - 0xc]
push ecx
push edi
push esi
push ebx
call sub.KERNEL32.dll_WriteFile
nop
lea edx, [ebp - 0x30]
mov esi, eax
xor eax, eax
push edx
push ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x1938], ecx
mov dword [eax + 0x193c], edx
test esi, esi
je 0x41db46
xor ecx, ecx
cmp dword [ebp - 0xc], edi
jne 0x41db46
mov edx, dword [ebp - 0x34]
cmp ecx, edx
jne 0x41db46
add dword [ebp - 0x18], edi
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x1c]
adc eax, edx
mov dword [ebp - 0x14], eax
cmp eax, dword [ecx + 4]
jb 0x41d998
ja 0x41daee
mov edx, dword [ebp - 0x18]
mov eax, ecx
cmp edx, dword [eax]
jb 0x41d998
mov ebx, dword [ebp + 0xc]
mov esi, ecx
jmp 0x41d977
push ebx
call fcn.0048989b
add esp, 4
mov eax, 0x22
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0048989b
add esp, 4
mov eax, 0x23
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push esi
call fcn.0048989b
add esp, 4
mov eax, 0x24
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov edx, dword [ebp + 0xc]
push edx
call fcn.0048989b
add esp, 4
pop edi
pop esi
mov eax, 0x25
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0x18