Function at 0x4a5020
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x5153d4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x7cc830], 0
push ebx
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, 4
jne 0x4a524a
mov ax, word [0x515480]
cmp ax, 0xa
jle 0x4a5062
mov eax, 0xa
mov word [0x515480], ax
cwde
push eax
lea eax, [ebp - 0x18]
push 0x510250
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x18]
xor edx, edx
xor ecx, ecx
push eax
push 0
call fcn.00475e60
mov esi, eax
add esp, 8
mov dword [0x7cc830], esi
mov ecx, dword [esi + 0x2e]
call fcn.004a74b0
mov ecx, dword [esi + 0x32]
call fcn.004a74b0
or dword [esi], 0x200
xor eax, eax
mov dword [esi + 0x28], eax
mov eax, 8
mov word [esi + 0x2c], ax
xor eax, eax
mov word [esi + 0x18], ax
mov eax, 1
mov word [esi + 6], ax
mov eax, dword [0x7cc830]
mov dword [esi + 0x24], 0xa8
mov dword [esi + 0x1a], 0x516770
test eax, eax
je 0x4a50ed
or dword [eax], 0x400
xor ecx, ecx
mov word [eax + 0x1e], bx
mov dword [eax + 0x20], 0x51674c
mov word [eax + 8], cx
mov ax, word [0x51548c]
cmp ax, 0xa
jle 0x4a5104
mov eax, 0xa
mov word [0x51548c], ax
cwde
push eax
lea eax, [ebp - 0x18]
push str.__2d
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x18]
mov edx, 0x19
xor ecx, ecx
push eax
push 0
call fcn.00475e60
push 0x50f38c
push 0
mov edx, 0xffffffe0
mov dword [0x7cc834], eax
xor ecx, ecx
call fcn.00475e60
mov esi, eax
add esp, 0x10
mov dword [0x7cc838], esi
mov ecx, dword [esi + 0x2e]
call fcn.004a74b0
mov ecx, dword [esi + 0x32]
call fcn.004a74b0
or dword [esi], 0x200
xor eax, eax
mov dword [esi + 0x28], eax
mov eax, 0x30
mov word [esi + 0x2c], ax
xor eax, eax
mov word [esi + 0x18], ax
mov eax, 1
mov word [esi + 6], ax
mov dword [esi + 0x24], 0x5500b4
mov dword [esi + 0x1a], 0x516770
lea ecx, [eax + 0xe]
mov eax, dword [0x7cc838]
test eax, eax
je 0x4a51ad
or dword [eax], 0x400
mov word [eax + 0x1e], cx
xor ecx, ecx
mov dword [eax + 0x20], 0x51674c
mov word [eax + 8], cx
mov eax, dword [0x6e6b68]
mov edx, 0xffffffe2
xor ecx, ecx
push dword [eax + 0x14]
push 0
call fcn.00475e60
mov esi, eax
add esp, 8
mov dword [0x7cc83c], esi
mov ecx, dword [esi + 0x2e]
call fcn.004a74b0
mov ecx, dword [esi + 0x32]
call fcn.004a74b0
or dword [esi], 0x200
xor eax, eax
mov ecx, dword [0x7cc83c]
mov dword [esi + 0x28], eax
mov eax, 8
mov word [esi + 0x2c], ax
xor eax, eax
mov dword [esi + 0x24], 0xb0
mov dword [esi + 0x1a], 0x516840
mov word [esi + 0x18], ax
mov word [esi + 6], ax
test ecx, ecx
je 0x4a5230
or dword [ecx], 0x400
mov eax, 0xf
mov word [ecx + 0x1e], ax
xor eax, eax
mov dword [ecx + 0x20], 0x516818
mov word [ecx + 8], ax
mov edx, 0x7cc830
mov eax, dword [edx]
test eax, eax
je 0x4a523e
or dword [eax], 0x30
add edx, ebx
cmp edx, 0x7cc840
jl 0x4a5235
jmp 0x4a5250
mov ecx, dword [0x7cc83c]
test byte [0x6e7040], 1
mov dx, word [0x6e7000]
je 0x4a5307
test dx, dx
jle 0x4a5307
movsx eax, dx
mov eax, dword [eax*4 + 0x7cc830]
test eax, eax
je 0x4a5281
and dword [eax], 0xfffff9ff
dec dx
movsx eax, dx
mov word [0x6e7000], dx
mov esi, dword [eax*4 + 0x7cc830]
mov ecx, dword [esi + 0x2e]
call fcn.004a74b0
mov ecx, dword [esi + 0x32]
call fcn.004a74b0
mov dx, word [0x6e7000]
xor eax, eax
or dword [esi], 0x200
mov dword [esi + 0x28], eax
mov eax, 8
mov word [esi + 0x2c], ax
xor eax, eax
mov word [esi + 0x18], ax
mov eax, 1
mov word [esi + 6], ax
movsx eax, dx
mov dword [esi + 0x24], 0xa8
mov dword [esi + 0x1a], 0x516770
mov eax, dword [eax*4 + 0x7cc830]
test eax, eax
je 0x4a5301
or dword [eax], 0x400
xor ecx, ecx
mov word [eax + 0x1e], bx
mov dword [eax + 0x20], 0x51674c
mov word [eax + 8], cx
mov ecx, dword [0x7cc83c]
test byte [0x6e7040], 2
je 0x4a53b8
cmp dx, 1
jge 0x4a53b8
movsx eax, dx
mov eax, dword [eax*4 + 0x7cc830]
test eax, eax
je 0x4a5332
and dword [eax], 0xfffff9ff
inc dx
movsx eax, dx
mov word [0x6e7000], dx
mov esi, dword [eax*4 + 0x7cc830]
mov ecx, dword [esi + 0x2e]
call fcn.004a74b0
mov ecx, dword [esi + 0x32]
call fcn.004a74b0
mov dx, word [0x6e7000]
xor eax, eax
or dword [esi], 0x200
mov dword [esi + 0x28], eax
mov eax, 8
mov word [esi + 0x2c], ax
xor eax, eax
mov word [esi + 0x18], ax
mov eax, 1
mov word [esi + 6], ax
movsx eax, dx
mov dword [esi + 0x24], 0xa8
mov dword [esi + 0x1a], 0x516770
mov eax, dword [eax*4 + 0x7cc830]
test eax, eax
je 0x4a53b2
or dword [eax], 0x400
xor ecx, ecx
mov word [eax + 0x1e], bx
mov dword [eax + 0x20], 0x51674c
mov word [eax + 8], cx
mov ecx, dword [0x7cc83c]
xor esi, esi
test dx, dx
mov edx, dword [0x748da4]
je 0x4a54b2
mov ax, word [0x51548c]
test bl, dl
je 0x4a53dc
test ax, ax
jle 0x4a53dc
dec ax
jmp 0x4a53f1
test dl, 8
je 0x4a54a5
cmp ax, 0xa
jge 0x4a54a5
inc ax
movzx eax, ax
mov esi, 1
mov word [0x51548c], ax
cwde
push eax
lea eax, [ebp - 0x18]
mov dword [0x6e7020], esi
push str.__2d
push eax
mov dword [0x6e701c], 0xa
call edi
mov edx, dword [0x7cc834]
add esp, 0xc
test edx, edx
je 0x4a5471
test byte [edx], 1
je 0x4a5471
cmp byte [ebp - 0x18], 0
lea eax, [ebp - 0x18]
mov ecx, esi
je 0x4a544f
nop dword [eax]
inc ecx
lea eax, [eax + 1]
cmp cx, 0x40
jg 0x4a544f
cmp byte [eax], 0
jne 0x4a5440
mov eax, dword [edx + 0x38]
movups xmm0, xmmword [ebp - 0x18]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 8]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [ebp + 8]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [ebp + 0x18]
movups xmmword [eax + 0x30], xmm0
mov ax, word [0x51548c]
test ax, ax
je 0x4a5489
cwde
lea eax, [eax + eax*2]
lea eax, [eax*2 + 4]
jmp 0x4a548b
xor eax, eax
xor edx, edx
mov dword [0x7cc8c8], eax
push 2
lea ecx, [edx + 0x73]
call fcn.00471b80
mov ecx, dword [0x7cc83c]
add esp, 4
test esi, esi
je 0x4a5632
jmp 0x4a55da
mov ax, word [0x515480]
test bl, dl
je 0x4a54c5
test ax, ax
jle 0x4a54c5
dec ax
jmp 0x4a54da
test dl, 8
je 0x4a5632
cmp ax, 0xa
jge 0x4a5632
inc ax
movzx eax, ax
mov word [0x515480], ax
cwde
push eax
lea eax, [ebp - 0x18]
mov dword [0x6e7020], 1
push 0x510250
push eax
mov dword [0x6e701c], 0xa
call edi
mov eax, dword [0x7cc830]
add esp, 0xc
test eax, eax
je 0x4a5537
test byte [eax], 1
je 0x4a5537
mov eax, dword [eax + 0x38]
movups xmm0, xmmword [ebp - 0x18]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 8]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [ebp + 8]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [ebp + 0x18]
movups xmmword [eax + 0x30], xmm0
mov ax, word [0x515480]
test ax, ax
je 0x4a5550
cwde
imul ecx, eax, 0x19
add ecx, 5
call fcn.004ab690
jmp 0x4a55cb
mov ecx, dword [0x7c2928]
mov byte [0x7b78cf], 0
mov dword [0x517284], 0xffffffff
mov dword [0x6f3a1c], 0xffffd8f0
test ecx, ecx
je 0x4a55cb
mov eax, dword [ecx]
push 0xffffd8f0
push ecx
call dword [eax + 0x3c]
mov ecx, dword [0x7c2928]
test ecx, ecx
je 0x4a55cb
cmp byte [0x7b78cf], 0
jne 0x4a55cb
mov eax, dword [ecx]
lea edx, [ebp - 0x1c]
push edx
push ecx
call dword [eax + 0x24]
test eax, eax
jne 0x4a55cb
test byte [ebp - 0x1c], 1
je 0x4a55cb
mov eax, dword [0x7c2928]
push 0
push 0x517284
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov eax, dword [0x7c2928]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov byte [0x7b78cf], 1
xor edx, edx
push 2
lea ecx, [edx + 0x73]
call fcn.00471b80
add esp, 4
call fcn.004adac0
push 0x51026c
push str.data.bin
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x4a562c
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push edi
push 0xa
push 4
push 0x6ef198
call esi
push edi
push 0xa
push 4
push 0x6ef1c0
call esi
push edi
push 1
push 4
push 0x6ef1e8
call esi
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x34
mov ecx, dword [0x7cc83c]
test dword [0x6e7040], 0x300000
je 0x4a56e9
mov edx, dword [0x7cc830]
test edx, edx
je 0x4a5667
mov eax, dword [edx]
test al, 1
je 0x4a5667
and eax, 0xfffffffe
mov dword [edx], eax
mov ax, word [0x7b7b9c]
dec ax
mov word [0x7b7b9c], ax
jmp 0x4a566d
mov ax, word [0x7b7b9c]
mov esi, dword [0x7cc834]
mov dword [0x7cc830], 0
test esi, esi
je 0x4a5695
mov edx, dword [esi]
test dl, 1
je 0x4a5695
and edx, 0xfffffffe
dec ax
mov dword [esi], edx
mov word [0x7b7b9c], ax
mov esi, dword [0x7cc838]
mov dword [0x7cc834], 0
test esi, esi
je 0x4a56bd
mov edx, dword [esi]
test dl, 1
je 0x4a56bd
and edx, 0xfffffffe
dec ax
mov dword [esi], edx
mov word [0x7b7b9c], ax
mov dword [0x7cc838], 0
test ecx, ecx
je 0x4a56df
mov edx, dword [ecx]
test dl, 1
je 0x4a56df
and edx, 0xfffffffe
dec ax
mov dword [ecx], edx
mov word [0x7b7b9c], ax
mov dword [0x7cc83c], 0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b557b
mov esp, ebp
pop ebp
ret