Function at 0x4d3530
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0xc64
mov edi, ecx
mov ebx, dword [esp + 0xc78]
mov dword [esp], ebx
mov dword [esp + 4], 0x76d7e0
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
test esi, esi
je 0x4d3824
lea eax, [esp + 0xc10]
xor edx, edx
and edx, 0xff
mov ebx, edx
shl ebx, 8
or edx, ebx
mov ebp, edx
shl ebp, 0x10
or edx, ebp
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov dword [eax + 0x14], edx
mov dword [eax + 0x18], edx
mov dword [eax + 0x1c], edx
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], edx
mov dword [eax + 0x28], edx
mov dword [eax + 0x2c], edx
mov dword [eax + 0x30], edx
mov dword [eax + 0x34], edx
mov byte [esp + 0xc10], 0x42
mov edx, dword [edi + 0x98]
lea ebp, [edx + edx*2]
imul ebp, dword [edi + 0x9c]
add ebp, 0x38
mov byte [esp + 0xc11], 0x4d
lea ebx, [esp + 0xc12]
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.004acc90
lea edx, [esp + 0xc1a]
mov dword [esp], edx
mov dword [esp + 4], 0x38
call fcn.004acc90
lea edx, [esp + 0xc1e]
mov dword [esp], edx
mov dword [esp + 4], 0x28
call fcn.004acc90
lea edx, [esp + 0xc22]
mov ebx, dword [edi + 0x98]
mov dword [esp], edx
mov dword [esp + 4], ebx
call fcn.004acc90
lea edx, [esp + 0xc26]
mov ebx, dword [edi + 0x9c]
mov dword [esp], edx
mov dword [esp + 4], ebx
call fcn.004acc90
lea edx, [esp + 0xc2a]
mov dword [esp], edx
mov dword [esp + 4], 1
call fcn.004acc90
lea edx, [esp + 0xc2c]
mov dword [esp], edx
mov dword [esp + 4], 0x18
call fcn.004acc90
lea edx, [esp + 0xc32]
mov ebx, dword [edi + 0x98]
mov dword [esp], edx
lea ebp, [ebx + ebx*2]
imul ebp, dword [edi + 0x9c]
mov dword [esp + 4], ebp
call fcn.004acc90
lea edx, [esp + 0xc10]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], 0x38
mov dword [esp + 0xc], esi
call dword [sym.imp.MSVCRT.dll_fwrite]
lea edx, [esp + 0x10]
mov eax, dword [edi + 0x98]
mov ecx, dword [edi + 0x9c]
mov dword [esp + 0xc5c], ecx
lea ebx, [eax + eax*2]
imul ebx, ecx
add ebx, dword [edi + 0x94]
lea ebp, [eax + eax*2]
neg ebp
add ebx, ebp
xor ebp, ebp
test ecx, ecx
jle 0x4d380e
lea ecx, [eax - 4]
mov dword [esp + 0xc58], ecx
mov dword [esp + 0xc50], esi
mov esi, eax
xor eax, eax
test esi, esi
jle 0x4d37b9
cmp esi, 4
jl 0x4d377d
mov dword [esp + 0xc48], ebp
mov dword [esp + 0xc4c], esi
mov dword [esp + 0xc54], edi
mov esi, esi
mov cl, byte [ebx]
add eax, 3
mov ebp, dword [esp + 0xc58]
mov byte [edx], cl
mov cl, byte [ebx + 1]
mov byte [edx + 1], cl
mov cl, byte [ebx + 2]
mov byte [edx + 2], cl
mov cl, byte [ebx + 3]
mov byte [edx + 3], cl
mov cl, byte [ebx + 4]
mov byte [edx + 4], cl
mov cl, byte [ebx + 5]
mov byte [edx + 5], cl
mov cl, byte [ebx + 6]
mov byte [edx + 6], cl
mov cl, byte [ebx + 7]
mov byte [edx + 7], cl
mov cl, byte [ebx + 8]
add ebx, 9
mov byte [edx + 8], cl
add edx, 9
cmp eax, ebp
jle 0x4d3720
mov ebp, dword [esp + 0xc48]
mov esi, dword [esp + 0xc4c]
mov edi, dword [esp + 0xc54]
mov dword [esp + 0xc48], ebp
mov dword [esp + 0xc54], edi
nop
lea esi, [esi]
mov cl, byte [ebx]
inc eax
mov byte [edx], cl
mov cl, byte [ebx + 1]
mov byte [edx + 1], cl
mov cl, byte [ebx + 2]
add ebx, 3
mov byte [edx + 2], cl
add edx, 3
cmp eax, esi
jl 0x4d3790
mov ebp, dword [esp + 0xc48]
mov edi, dword [esp + 0xc54]
mov edx, dword [edi + 0x98]
lea ecx, [edx + edx*4]
add ecx, dword [edi + 0x98]
neg ecx
add ebx, ecx
lea ecx, [edx + edx*2]
lea edx, [esp + 0x10]
mov dword [esp], edx
mov edx, dword [esp + 0xc50]
mov dword [esp + 4], 1
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
call dword [sym.imp.MSVCRT.dll_fwrite]
lea edx, [esp + 0x10]
inc ebp
mov ecx, dword [esp + 0xc5c]
cmp ebp, ecx
jl 0x4d36f6
mov esi, dword [esp + 0xc50]
mov dword [esp], esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc64
pop ebx
pop ebp
pop esi
pop edi
ret 4
mov dword [esp], 0x10
mov dword [esp + 4], 0x774860
mov dword [esp + 8], ebx
call fcn.005041f0
add esp, 0xc64
pop ebx
pop ebp
pop esi
pop edi
ret 4