Function at 0x4ad050
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x664
mov ebx, dword [esp + 0x678]
mov ebp, dword [esp + 0x67c]
mov dword [esp], ebx
mov dword [esp + 4], 0x76d7e0
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
test esi, esi
je 0x4ad6a0
lea edx, [esp + 0x610]
xor ecx, ecx
and ecx, 0xff
mov edi, ecx
shl edi, 8
or ecx, edi
mov ebx, ecx
shl ebx, 0x10
or ecx, ebx
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov dword [edx + 0x14], ecx
mov dword [edx + 0x18], ecx
mov dword [edx + 0x1c], ecx
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
mov dword [edx + 0x28], ecx
mov dword [edx + 0x2c], ecx
mov dword [edx + 0x30], ecx
mov word [edx + 0x34], cx
mov byte [esp + 0x610], 0x42
lea edi, [ebp + ebp*2]
mov ebx, dword [esp + 0x680]
mov byte [esp + 0x611], 0x4d
imul ebx, edi
lea edx, [ebx + 0x36]
lea ecx, [esp + 0x612]
mov dword [esp], ecx
mov dword [esp + 4], edx
call fcn.004acc90
lea edx, [esp + 0x61a]
mov dword [esp], edx
mov dword [esp + 4], 0x36
call fcn.004acc90
lea edx, [esp + 0x61e]
mov dword [esp], edx
mov dword [esp + 4], 0x28
call fcn.004acc90
lea edx, [esp + 0x622]
mov dword [esp], edx
mov dword [esp + 4], ebp
call fcn.004acc90
lea ecx, [esp + 0x626]
mov edx, dword [esp + 0x680]
mov dword [esp], ecx
mov dword [esp + 4], edx
call fcn.004acc90
lea edx, [esp + 0x62a]
mov dword [esp], edx
mov dword [esp + 4], 1
call fcn.004acc90
lea edx, [esp + 0x62c]
mov dword [esp], edx
mov dword [esp + 4], 0x18
call fcn.004acc90
lea edx, [esp + 0x632]
mov dword [esp], edx
mov dword [esp + 4], ebx
call fcn.004acc90
lea edx, [esp + 0x610]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], 0x36
mov dword [esp + 0xc], esi
call dword [sym.imp.MSVCRT.dll_fwrite]
lea eax, [esp + 0x10]
mov edx, dword [0x56a020]
cmp edx, 0x10
je 0x4ad570
cmp edx, 0x18
jne 0x4ad2f7
lea ecx, [ebp + ebp*2]
neg ecx
add ecx, ebx
add ecx, dword [esp + 0x684]
xor ebx, ebx
mov edx, dword [esp + 0x680]
mov dword [esp + 0x648], ecx
test edx, edx
jle 0x4ad687
lea edx, [ebp + ebp*4]
add edx, ebp
neg edx
mov dword [esp + 0x64c], edx
mov ecx, eax
mov dword [esp + 0x650], esi
mov esi, dword [esp + 0x648]
xor eax, eax
test ebp, ebp
jle 0x4ad2ac
mov dword [esp + 0x658], ebx
mov ebp, eax
mov ebx, ecx
mov dword [esp + 0x654], edi
lea esi, [esi]
mov edx, dword [0x574e14]
inc ebp
cmp edx, dword [0x574e10]
jle 0x4ad270
mov dl, byte [esi]
lea edi, [esi + 1]
lea eax, [ebx + 1]
mov byte [ebx], dl
mov cl, byte [esi + 1]
add esi, 3
mov byte [ebx + 1], cl
mov dl, byte [edi + 1]
add ebx, 3
mov byte [eax + 1], dl
jmp 0x4ad28c
mov cl, byte [esi]
lea edi, [esi + 1]
mov al, byte [esi + 1]
add esi, 3
mov dl, byte [edi + 1]
mov byte [ebx], dl
lea edx, [ebx + 1]
mov byte [ebx + 1], al
add ebx, 3
mov byte [edx + 1], cl
mov edx, dword [esp + 0x67c]
cmp ebp, edx
jl 0x4ad240
mov ebx, dword [esp + 0x658]
mov edi, dword [esp + 0x654]
mov ebp, dword [esp + 0x67c]
add esi, dword [esp + 0x64c]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0x650]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
call dword [sym.imp.MSVCRT.dll_fwrite]
lea ecx, [esp + 0x10]
inc ebx
mov edx, dword [esp + 0x680]
cmp ebx, edx
jl 0x4ad220
mov esi, dword [esp + 0x650]
jmp 0x4ad687
cmp edx, 0x20
jne 0x4ad687
lea ecx, [ebp + ebp]
add ecx, ecx
mov edx, dword [esp + 0x680]
imul ecx, edx
lea ebx, [ecx + edx*4]
xor ecx, ecx
add ebx, dword [esp + 0x684]
test edx, edx
jle 0x4ad687
lea edx, [ebp + ebp]
add edx, edx
add edx, edx
neg edx
mov dword [esp + 0x648], edx
lea edx, [ebp - 4]
mov dword [esp + 0x64c], edx
mov dword [esp + 0x654], edi
mov edi, ecx
xor edx, edx
test ebp, ebp
jle 0x4ad519
cmp ebp, 4
jl 0x4ad49b
mov dword [esp + 0x658], edi
mov ebp, eax
mov dword [esp + 0x65c], edx
mov dword [esp + 0x650], esi
mov edx, dword [ebx]
mov ecx, dword [0x574e10]
mov dword [esp + 0x660], edx
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov esi, dword [esp + 0x65c]
mov byte [ebp], dl
mov ecx, dword [0x574e0c]
mov edx, dword [esp + 0x660]
add esi, 3
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov edi, dword [esp + 0x64c]
mov byte [ebp + 1], dl
mov ecx, dword [0x574e14]
mov edx, dword [esp + 0x660]
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 2], dl
mov edx, dword [ebx + 4]
mov ecx, dword [0x574e10]
mov dword [esp + 0x660], edx
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 3], dl
mov ecx, dword [0x574e0c]
mov edx, dword [esp + 0x660]
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 4], dl
mov ecx, dword [0x574e14]
mov edx, dword [esp + 0x660]
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 5], dl
mov eax, dword [ebx + 8]
mov ecx, dword [0x574e10]
mov edx, eax
add ebx, 0xc
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 6], dl
mov ecx, dword [0x574e0c]
mov edx, eax
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 7], dl
mov ecx, dword [0x574e14]
shr eax, cl
and eax, 0x1f
add eax, eax
add eax, eax
add eax, eax
mov byte [ebp + 8], al
add ebp, 9
cmp esi, edi
mov dword [esp + 0x65c], esi
jle 0x4ad372
mov eax, ebp
mov edi, dword [esp + 0x658]
mov edx, esi
mov esi, dword [esp + 0x650]
mov ebp, dword [esp + 0x67c]
mov dword [esp + 0x658], edi
mov ebp, eax
mov edi, edx
mov dword [esp + 0x650], esi
lea esi, [esi]
mov eax, dword [ebx]
mov ecx, dword [0x574e10]
mov edx, eax
inc edi
add ebx, 4
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov esi, dword [esp + 0x67c]
mov byte [ebp], dl
mov ecx, dword [0x574e0c]
mov edx, eax
shr edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
mov byte [ebp + 1], dl
mov ecx, dword [0x574e14]
shr eax, cl
and eax, 0x1f
add eax, eax
add eax, eax
add eax, eax
mov byte [ebp + 2], al
add ebp, 3
cmp edi, esi
jl 0x4ad4b0
mov edi, dword [esp + 0x658]
mov esi, dword [esp + 0x650]
mov ebp, dword [esp + 0x67c]
mov edx, dword [esp + 0x648]
lea ebx, [edx + ebx + 4]
add ebx, 0xfffffff8
lea edx, [esp + 0x10]
mov dword [esp], edx
mov dword [esp + 4], 1
mov edx, dword [esp + 0x654]
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
call dword [sym.imp.MSVCRT.dll_fwrite]
lea eax, [esp + 0x10]
inc edi
mov edx, dword [esp + 0x680]
cmp edi, edx
jl 0x4ad348
jmp 0x4ad687
lea ecx, [ebp + ebp]
mov edx, dword [esp + 0x680]
imul ecx, edx
lea ecx, [ecx + edx*4]
xor ebx, ebx
add ecx, dword [esp + 0x684]
test edx, edx
jle 0x4ad687
lea edx, [ebp + ebp]
add edx, edx
neg edx
mov dword [esp + 0x64c], edx
mov dword [esp + 0x650], esi
mov esi, ebp
mov ebp, ecx
mov ecx, eax
xor eax, eax
test esi, esi
jle 0x4ad63a
mov dword [esp + 0x648], ebx
mov esi, ecx
mov dword [esp + 0x654], edi
mov edi, eax
lea esi, [esi]
movzx eax, word [ebp]
mov ecx, dword [0x574e10]
mov edx, eax
mov ebx, eax
add ebp, 2
sar edx, cl
and edx, 0x1f
add edx, edx
add edx, edx
add edx, edx
inc edi
mov byte [esi], dl
mov ecx, dword [0x574e0c]
sar ebx, cl
and ebx, 0x1f
add ebx, ebx
add ebx, ebx
add ebx, ebx
mov edx, dword [esp + 0x67c]
mov byte [esi + 1], bl
mov ecx, dword [0x574e14]
sar eax, cl
and eax, 0x1f
add eax, eax
add eax, eax
add eax, eax
mov byte [esi + 2], al
add esi, 3
cmp edi, edx
jl 0x4ad5d0
mov ebx, dword [esp + 0x648]
mov edi, dword [esp + 0x654]
mov esi, dword [esp + 0x67c]
mov eax, dword [esp + 0x64c]
lea ebp, [eax + ebp + 4]
add ebp, 0xfffffff8
lea edx, [esp + 0x10]
mov eax, dword [esp + 0x650]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
call dword [sym.imp.MSVCRT.dll_fwrite]
lea ecx, [esp + 0x10]
inc ebx
mov edx, dword [esp + 0x680]
cmp ebx, edx
jl 0x4ad5ae
mov esi, dword [esp + 0x650]
mov dword [esp], esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, 1
add esp, 0x664
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp], 0x10
mov dword [esp + 4], 0x774860
mov dword [esp + 8], ebx
call fcn.005041f0
xor eax, eax
add esp, 0x664
pop ebx
pop ebp
pop esi
pop edi
ret