Function at 0x4422aa
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52dab0
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x534014]
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 - 0x5c], esi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], edx
mov eax, dword [edx*4 + 0x536fb0]
mov dword [ebp - 0x44], ecx
mov eax, dword [ecx + eax + 0x18]
mov dword [ebp - 0x60], 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 0x442323
mov ecx, ebx
call fcn.00434a70
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 - 0x5c]
mov edi, eax
mov dword [ebp - 0x34], edi
cmp eax, dword [ebp - 0x50]
jae 0x44264c
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 + 0x536fb0]
mov dword [ebp - 0x38], eax
cmp ecx, 0xfde9
jne 0x44249f
mov ecx, dword [ebp - 0x38]
mov eax, ebx
mov edx, dword [ebp - 0x44]
add ecx, 0x2e
add ecx, edx
cmp byte [ecx], bl
je 0x44238e
inc eax
inc ecx
cmp eax, 5
jl 0x442383
mov edi, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x34]
sub edi, ecx
mov dword [ebp - 0x2c], eax
test eax, eax
jle 0x44243f
mov eax, dword [ebp - 0x38]
add eax, 0x2e
add eax, edx
mov dword [ebp - 0x64], eax
movzx eax, byte [eax]
movsx eax, byte [eax + 0x534788]
inc eax
mov dword [ebp - 0x3c], eax
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
cmp eax, edi
jg 0x4425ce
mov ecx, dword [ebp - 0x2c]
mov edi, ebx
mov esi, dword [ebp - 0x64]
mov al, byte [esi]
mov byte [ebp + edi - 0x18], al
inc edi
inc esi
cmp edi, ecx
jl 0x4423d0
mov edi, dword [ebp - 0x38]
test edi, edi
jle 0x4423fc
push edi
mov edi, dword [ebp - 0x34]
lea eax, [ebp - 0x18]
add eax, ecx
push edi
push eax
call fcn.0042fd00
mov edx, dword [ebp - 0x44]
add esp, 0xc
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x4c]
mov edi, ebx
mov eax, dword [esi*4 + 0x536fb0]
add eax, edx
mov byte [eax + edi + 0x2e], bl
inc edi
cmp edi, ecx
jl 0x442401
push dword [ebp - 0x48]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov edi, dword [ebp - 0x34]
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x68], eax
xor eax, eax
cmp dword [ebp - 0x3c], 4
push ecx
sete al
mov dword [ebp - 0x7c], ebx
inc eax
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0x68]
jmp 0x44247e
movzx eax, byte [ecx]
movsx ecx, byte [eax + 0x534788]
inc ecx
mov dword [ebp - 0x38], ecx
cmp ecx, edi
jg 0x4425fc
push dword [ebp - 0x48]
mov edi, dword [ebp - 0x34]
xor eax, eax
cmp ecx, 4
mov dword [ebp - 0x84], ebx
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x80], ebx
sete al
mov dword [ebp - 0x3c], edi
inc eax
push ecx
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0044737f
add esp, 0x14
cmp eax, 0xffffffff
je 0x44264c
mov eax, dword [ebp - 0x38]
dec eax
add edi, eax
jmp 0x442528
mov ecx, dword [ebp - 0x44]
mov dl, byte [ecx + eax + 0x2d]
test dl, 4
je 0x4424cc
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 0x442513
push dword [ebp - 0x6c]
movsx eax, byte [edi]
push eax
call fcn.004472d6
pop ecx
pop ecx
test eax, eax
je 0x44250d
lea eax, [edi + 1]
mov dword [ebp - 0x3c], eax
cmp eax, dword [ebp - 0x50]
jae 0x442620
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
push 2
push edi
push eax
call fcn.00440e0e
add esp, 0x10
cmp eax, 0xffffffff
je 0x44264c
mov edi, dword [ebp - 0x3c]
jmp 0x442528
push dword [ebp - 0x48]
push 1
push edi
lea eax, [ebp - 0x40]
push eax
call fcn.00440e0e
add esp, 0x10
cmp eax, 0xffffffff
je 0x44264c
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 - 0x34], edi
push eax
push ebx
push dword [ebp - 0x70]
call fcn.00444019
add esp, 0x20
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x44264c
push ebx
lea ecx, [ebp - 0x58]
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x442644
mov eax, edi
sub eax, dword [ebp - 0x5c]
add eax, dword [esi + 8]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x58], eax
jb 0x44264c
cmp byte [ebp - 0x2d], 0xa
jne 0x4425bd
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 - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x442644
cmp dword [ebp - 0x58], 1
jb 0x44264c
inc dword [esi + 8]
inc dword [esi + 4]
cmp edi, dword [ebp - 0x50]
jae 0x44264c
mov ecx, dword [ebp - 0x74]
jmp 0x44234e
test edi, edi
jle 0x4425f7
mov esi, dword [ebp - 0x2c]
mov eax, edx
mov edx, dword [ebp - 0x4c]
mov cl, byte [ebx + ecx]
mov edx, dword [edx*4 + 0x536fb0]
add edx, eax
add edx, ebx
inc ebx
mov byte [edx + esi + 0x2e], cl
mov ecx, dword [ebp - 0x34]
cmp ebx, edi
jl 0x4425d7
mov esi, dword [ebp + 8]
add dword [esi + 4], edi
jmp 0x44264c
test edi, edi
jle 0x4425f7
mov edx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax*4 + 0x536fb0]
mov al, byte [ebx + edx]
add ecx, esi
mov byte [ecx + ebx + 0x2e], al
inc ebx
cmp ebx, edi
jl 0x442606
jmp 0x4425f4
mov ebx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x44]
mov al, byte [edi]
mov ecx, dword [ebx*4 + 0x536fb0]
mov byte [edx + ecx + 0x2e], al
mov eax, dword [ebx*4 + 0x536fb0]
or byte [edx + eax + 0x2d], 4
inc dword [esi + 4]
jmp 0x44264c
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.00426f36
leave
ret