Function at 0x1027bfb
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x1030118]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push dword [esi + 0x58]
xor edi, edi
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x118], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
cmp eax, 0x104
jbe 0x1027c32
push 0xe
pop eax
jmp 0x10280f6
push ebx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [esi + 0x58]
call dword [sym.imp.USER32.dll_CharToOemBuffA]
xor ebx, ebx
inc ebx
cmp dword [esi + 0x1c], edi
jl 0x1027c5a
jg 0x1027c54
cmp dword [esi + 0x18], 0xffffffff
jb 0x1027c5a
mov dword [ebp - 0x118], ebx
cmp dword [esi + 0x14], edi
jl 0x1027c6e
jg 0x1027c67
cmp dword [esi + 0x10], 0xffffffff
jb 0x1027c6e
or dword [ebp - 0x118], 2
cmp dword [esi + 0x44], edi
jl 0x1027c82
jg 0x1027c7b
cmp dword [esi + 0x40], 0xffffffff
jb 0x1027c82
or dword [ebp - 0x118], 4
mov eax, dword [ebp - 0x118]
dec eax
push 0x14
pop edi
je 0x1027e3a
dec eax
je 0x1027e02
dec eax
je 0x1027dbe
dec eax
je 0x1027d83
dec eax
je 0x1027d46
dec eax
je 0x1027d46
dec eax
je 0x1027cf4
mov eax, dword [esi + 0x28]
xor ebx, ebx
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x10c], ebx
cmp eax, ebx
jbe 0x1027ce9
push eax
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
cmp eax, ebx
jne 0x1027e73
push 4
jmp 0x10280f4
mov dword [ebp - 0x114], ebx
jmp 0x1027e73
mov ecx, dword [esi + 0x28]
push 0x1c
pop eax
add ecx, eax
push ecx
mov dword [ebp - 0x10c], eax
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1027ce2
mov word [eax], bx
push 0x18
pop ecx
mov word [eax + 2], cx
mov ecx, dword [esi + 0x18]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x1c]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x10]
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0x14]
mov dword [eax + 0x10], ecx
mov ecx, dword [esi + 0x40]
mov dword [eax + 0x14], ecx
mov ecx, dword [esi + 0x44]
mov dword [eax + 0x18], ecx
jmp 0x1027e73
mov eax, dword [esi + 0x28]
add eax, edi
push eax
mov dword [ebp - 0x10c], edi
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1027ce2
mov word [eax], bx
push 0x10
pop ecx
mov word [eax + 2], cx
mov ecx, dword [esi + 0x18]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x1c]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x40]
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0x44]
jmp 0x1027dfd
mov ecx, dword [esi + 0x28]
push 0xc
pop eax
add ecx, eax
push ecx
mov dword [ebp - 0x10c], eax
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1027ce2
push 8
pop ecx
mov word [eax], bx
mov word [eax + 2], cx
mov ecx, dword [esi + 0x40]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x44]
jmp 0x1027e70
mov eax, dword [esi + 0x28]
add eax, edi
push eax
mov dword [ebp - 0x10c], edi
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1027ce2
push 0x10
mov word [eax], bx
pop ecx
mov word [eax + 2], cx
mov ecx, dword [esi + 0x18]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x1c]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x10]
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0x14]
mov dword [eax + 0x10], ecx
jmp 0x1027e73
mov ecx, dword [esi + 0x28]
push 0xc
pop eax
add ecx, eax
push ecx
mov dword [ebp - 0x10c], eax
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1027ce2
push 8
pop ecx
mov word [eax], bx
mov word [eax + 2], cx
mov ecx, dword [esi + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x14]
jmp 0x1027e70
mov ecx, dword [esi + 0x28]
push 0xc
pop eax
add ecx, eax
push ecx
mov dword [ebp - 0x10c], eax
call fcn.0101be72
pop ecx
mov dword [ebp - 0x114], eax
test eax, eax
je 0x1027ce2
push 8
pop ecx
mov word [eax], bx
mov word [eax + 2], cx
mov ecx, dword [esi + 0x18]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x1c]
mov dword [eax + 8], ecx
mov eax, dword [esi + 0x28]
test eax, eax
jbe 0x1027e9d
cmp dword [ebp - 0x114], 0
je 0x1027e9d
push eax
movzx eax, word [ebp - 0x10c]
push dword [esi + 0x50]
add eax, dword [ebp - 0x114]
push eax
call fcn.0102caae
add esp, 0xc
movzx eax, word [ebp - 0x10c]
add eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
add eax, dword [esi + 0x20]
and dword [ebp - 0x120], 0
lea eax, [eax + ecx + 0x2e]
mov dword [ebp - 0x124], eax
inc eax
push eax
call fcn.0101be72
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10280dd
cmp dword [ebp - 0x118], 0
mov dword [ebx], 0x2014b50
je 0x1027f3c
mov ax, word [esi]
mov word [ebx + 4], ax
mov ax, word [esi + 2]
mov word [ebx + 6], ax
mov ax, word [esi + 4]
mov word [ebx + 8], ax
mov ax, word [esi + 6]
mov word [ebx + 0xa], ax
mov eax, dword [esi + 8]
mov dword [ebx + 0xc], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x118]
dec eax
je 0x1027fc2
dec eax
je 0x1027fba
dec eax
je 0x1027faa
dec eax
je 0x1027f95
dec eax
je 0x1027f8c
dec eax
je 0x1027f7d
dec eax
je 0x1027f6e
mov eax, dword [esi + 0x18]
mov dword [ebx + 0x18], eax
jmp 0x1027fc9
xor eax, eax
cmp word [esi + 6], 9
sete al
add eax, edi
movzx ecx, ax
movzx eax, word [esi]
cmp ax, 0x2d
jb 0x1027f5a
mov word [ebx + 4], cx
jmp 0x1027f5e
mov word [ebx + 4], ax
movzx eax, word [esi + 2]
cmp ax, 0x2d
jb 0x1027eea
mov word [ebx + 6], cx
jmp 0x1027eee
or eax, 0xffffffff
lea edi, [ebx + 0x18]
stosd dword es:[edi], eax
or eax, eax
lea edi, [ebx + 0x14]
stosd dword es:[edi], eax
jmp 0x1027fa4
mov eax, dword [esi + 0x18]
mov dword [ebx + 0x18], eax
or eax, 0xffffffff
lea edi, [ebx + 0x14]
stosd dword es:[edi], eax
jmp 0x1027fa1
or eax, 0xffffffff
lea edi, [ebx + 0x18]
stosd dword es:[edi], eax
jmp 0x1027f9b
mov eax, dword [esi + 0x18]
mov dword [ebx + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x14], eax
or eax, 0xffffffff
lea edi, [ebx + 0x2a]
stosd dword es:[edi], eax
jmp 0x1027fd5
or eax, 0xffffffff
lea edi, [ebx + 0x18]
stosd dword es:[edi], eax
or eax, 0xffffffff
lea edi, [ebx + 0x14]
stosd dword es:[edi], eax
jmp 0x1027fcf
mov eax, dword [esi + 0x18]
mov dword [ebx + 0x18], eax
jmp 0x1027fb1
or eax, 0xffffffff
lea edi, [ebx + 0x18]
stosd dword es:[edi], eax
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x14], eax
mov eax, dword [esi + 0x40]
mov dword [ebx + 0x2a], eax
mov ax, word [esi + 0x20]
mov di, word [ebp - 0x10c]
mov word [ebx + 0x1c], ax
add di, word [esi + 0x28]
mov word [ebx + 0x1e], di
mov ax, word [esi + 0x2c]
sub di, word [esi + 0x28]
mov word [ebx + 0x20], ax
mov ax, word [esi + 0x30]
mov word [ebx + 0x22], ax
mov ax, word [esi + 0x34]
mov word [ebx + 0x24], ax
mov eax, dword [esi + 0x38]
mov dword [ebx + 0x26], eax
push dword [esi + 0x20]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebx + 0x2e]
push eax
call fcn.0102caae
add esp, 0xc
cmp dword [ebp - 0x118], 0
je 0x102803c
movzx eax, di
add eax, dword [esi + 0x28]
push eax
push dword [ebp - 0x114]
jmp 0x1028047
mov eax, dword [esi + 0x28]
test eax, eax
jbe 0x1028057
push eax
push dword [esi + 0x50]
mov eax, dword [esi + 0x20]
lea eax, [eax + ebx + 0x2e]
push eax
call fcn.0102caae
add esp, 0xc
mov eax, dword [esi + 0x2c]
test eax, eax
jbe 0x102807a
mov ecx, dword [esi + 0x28]
push eax
push dword [esi + 0x54]
movzx eax, di
add eax, dword [esi + 0x20]
add eax, ebx
lea eax, [eax + ecx + 0x2e]
push eax
call fcn.0102caae
add esp, 0xc
push 0
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x124]
mov eax, dword [ebp - 0x11c]
push ebx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10280d6
mov eax, dword [ebp - 0x124]
cmp dword [ebp - 0x110], eax
jne 0x10280d6
push ebx
call fcn.0101be7e
cmp dword [ebp - 0x114], 0
pop ecx
je 0x10280ce
push dword [ebp - 0x114]
movzx eax, di
mov dword [esi + 0x64], eax
call fcn.0101be7e
pop ecx
jmp 0x10280d2
and dword [esi + 0x64], 0
xor eax, eax
jmp 0x10280f5
push ebx
call fcn.0101be7e
pop ecx
cmp dword [ebp - 0x114], 0
je 0x10280f2
push dword [ebp - 0x114]
call fcn.0101be7e
pop ecx
push 0xa
pop eax
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0101bc5d
leave
ret 0xc