Function at 0x10028a5b
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002d9f1
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x1003b010]
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, dword [ebp + 0xc]
mov edx, eax
mov esi, dword [ebp + 0x10]
and eax, 0x3f
mov ebx, dword [ebp + 0x18]
imul ecx, eax, 0x38
sar edx, 6
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], edx
mov eax, dword [edx*4 + 0x1003d818]
mov dword [ebp - 0x34], ecx
mov eax, dword [ecx + eax + 0x18]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x14]
add eax, esi
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
cmp byte [ebx + 0x14], 0
mov dword [ebp - 0x70], eax
jne 0x10028ad4
mov ecx, ebx
call fcn.100222b0
mov esi, dword [ebp + 8]
lea eax, [ebx + 0xc]
mov dword [ebp - 0x6c], eax
mov edi, esi
mov eax, dword [eax]
mov ecx, dword [eax + 8]
xor eax, eax
stosd dword es:[edi], eax
mov dword [ebp - 0x74], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x60]
mov edi, eax
mov dword [ebp - 0x44], edi
cmp eax, dword [ebp - 0x50]
jae 0x10028e0e
xor ebx, ebx
mov al, byte [edi]
mov byte [ebp - 0x2d], al
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x2c], 1
mov eax, dword [eax*4 + 0x1003d818]
mov dword [ebp - 0x38], eax
cmp ecx, 0xfde9
jne 0x10028c61
mov ecx, dword [ebp - 0x38]
mov eax, ebx
mov edx, dword [ebp - 0x34]
add ecx, 0x2e
add ecx, edx
cmp byte [ecx], bl
je 0x10028b3f
inc eax
inc ecx
cmp eax, 5
jl 0x10028b34
mov edi, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x44]
sub edi, ecx
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10028c03
mov eax, dword [ebp - 0x38]
add eax, 0x2e
add eax, edx
mov dword [ebp - 0x5c], eax
movzx eax, byte [eax]
movsx eax, byte [eax + 0x1003b830]
inc eax
mov dword [ebp - 0x3c], eax
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
cmp eax, edi
jg 0x10028d90
mov edi, dword [ebp - 0x2c]
mov esi, ebx
mov edx, dword [ebp - 0x5c]
mov al, byte [edx]
mov byte [ebp + esi - 0x18], al
inc esi
inc edx
cmp esi, edi
jl 0x10028b81
mov edx, dword [ebp - 0x34]
cmp dword [ebp - 0x38], ebx
jle 0x10028baa
push dword [ebp - 0x38]
lea eax, [ebp - 0x18]
add eax, edi
push ecx
push eax
call fcn.10021160
mov edx, dword [ebp - 0x34]
add esp, 0xc
mov esi, dword [ebp - 0x4c]
mov ecx, ebx
mov eax, dword [esi*4 + 0x1003d818]
add eax, edx
mov byte [eax + ecx + 0x2e], bl
inc ecx
cmp ecx, edi
jl 0x10028baf
push dword [ebp - 0x48]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x68], eax
lea ecx, [ebp - 0x7c]
xor eax, eax
mov dword [ebp - 0x7c], ebx
cmp dword [ebp - 0x3c], 4
push ecx
sete al
mov dword [ebp - 0x78], ebx
inc eax
push eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.1002a69c
add esp, 0x14
cmp eax, 0xffffffff
je 0x10028e0e
mov edi, dword [ebp - 0x38]
jmp 0x10028c58
movzx eax, byte [ecx]
movsx edx, byte [eax + 0x1003b830]
inc edx
mov dword [ebp - 0x5c], edx
cmp edx, edi
jg 0x10028dbe
push dword [ebp - 0x48]
xor eax, eax
mov dword [ebp - 0x3c], ecx
cmp edx, 4
mov dword [ebp - 0x84], ebx
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x80], ebx
sete al
inc eax
push ecx
push eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.1002a69c
add esp, 0x14
cmp eax, 0xffffffff
je 0x10028e0e
mov edi, dword [ebp - 0x5c]
add edi, dword [ebp - 0x44]
dec edi
jmp 0x10028cea
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + eax + 0x2d]
test dl, 4
je 0x10028c8e
mov al, byte [ecx + eax + 0x2e]
and dl, 0xfb
push dword [ebp - 0x48]
mov byte [ebp - 0x20], al
mov al, byte [edi]
mov byte [ebp - 0x1f], al
mov eax, dword [ebp - 0x38]
push 2
mov byte [ecx + eax + 0x2d], dl
lea eax, [ebp - 0x20]
push eax
jmp 0x10028cd5
push dword [ebp - 0x6c]
movsx eax, byte [edi]
push eax
call fcn.1002a61f
pop ecx
pop ecx
test eax, eax
je 0x10028ccf
lea eax, [edi + 1]
mov dword [ebp - 0x3c], eax
cmp eax, dword [ebp - 0x50]
jae 0x10028de2
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
push 2
push edi
push eax
call fcn.100276d2
add esp, 0x10
cmp eax, 0xffffffff
je 0x10028e0e
mov edi, dword [ebp - 0x3c]
jmp 0x10028cea
push dword [ebp - 0x48]
push 1
push edi
lea eax, [ebp - 0x40]
push eax
call fcn.100276d2
add esp, 0x10
cmp eax, 0xffffffff
je 0x10028e0e
push ebx
push ebx
push 5
lea eax, [ebp - 0x28]
inc edi
push eax
push dword [ebp - 0x2c]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x44], edi
push eax
push ebx
push dword [ebp - 0x70]
call fcn.10028428
add esp, 0x20
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x10028e0e
push ebx
lea ecx, [ebp - 0x58]
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10028e06
mov eax, edi
sub eax, dword [ebp - 0x60]
add eax, dword [esi + 8]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x58], eax
jb 0x10028e0e
cmp byte [ebp - 0x2d], 0xa
jne 0x10028d7f
push 0xd
pop eax
push ebx
mov word [ebp - 0x54], ax
lea eax, [ebp - 0x58]
push eax
push 1
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10028e06
cmp dword [ebp - 0x58], 1
jb 0x10028e0e
inc dword [esi + 8]
inc dword [esi + 4]
cmp edi, dword [ebp - 0x50]
jae 0x10028e0e
mov ecx, dword [ebp - 0x74]
jmp 0x10028aff
test edi, edi
jle 0x10028db9
mov esi, dword [ebp - 0x2c]
mov eax, edx
mov edx, dword [ebp - 0x4c]
mov cl, byte [ebx + ecx]
mov edx, dword [edx*4 + 0x1003d818]
add edx, eax
add edx, ebx
inc ebx
mov byte [edx + esi + 0x2e], cl
mov ecx, dword [ebp - 0x44]
cmp ebx, edi
jl 0x10028d99
mov esi, dword [ebp + 8]
add dword [esi + 4], edi
jmp 0x10028e0e
test edi, edi
jle 0x10028db9
mov edx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax*4 + 0x1003d818]
mov al, byte [ebx + edx]
add ecx, esi
mov byte [ecx + ebx + 0x2e], al
inc ebx
cmp ebx, edi
jl 0x10028dc8
jmp 0x10028db6
mov ebx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x34]
mov al, byte [edi]
mov ecx, dword [ebx*4 + 0x1003d818]
mov byte [edx + ecx + 0x2e], al
mov eax, dword [ebx*4 + 0x1003d818]
or byte [edx + eax + 0x2d], 4
inc dword [esi + 4]
jmp 0x10028e0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov eax, esi
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.100088cf
leave
ret