Function at 0x49af73
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1064
call fcn.004a98b0
mov eax, dword [0x4dd52c]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
xor eax, eax
cmp byte [esi + 0x9785], 1
push edi
mov edi, dword [esi + 0x3ea8]
mov dword [ebp - 0x1020], eax
mov dword [ebp - 0x1028], eax
mov dword [ebp - 0x1030], eax
mov dword [ebp - 0x1044], eax
mov dword [ebp - 0x1054], eax
mov dword [ebp - 0x1040], eax
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x103c], eax
mov byte [ebp - 0x1019], al
mov dword [ebp - 0x1064], eax
je 0x49afec
cmp byte [esi + 0x978c], 1
jne 0x49b010
push 0x16
push esi
call fcn.004a5597
test eax, eax
jne 0x49b010
mov eax, dword [esi + 0x3ea8]
xor ebx, ebx
inc ebx
mov dword [ebp - 0x1024], ebx
mov dword [ebp - 0x103c], eax
dec edi
jmp 0x49b013
xor ebx, ebx
inc ebx
cmp byte [esi + 0x977e], 1
je 0x49b025
cmp byte [esi + 0x978c], 1
jne 0x49b04a
push 0x16
push esi
call fcn.004a5597
test eax, eax
jne 0x49b04a
mov eax, dword [esi + 0x3ea8]
sub eax, dword [ebp - 0x1024]
mov dword [ebp - 0x1040], ebx
mov dword [ebp - 0x1048], eax
dec edi
push 2
pop ecx
cmp word [esi + 0x1bf2a], cx
jne 0x49b067
xor eax, eax
mov ax, word [esi + 0x8a36]
mov dword [ebp - 0x1028], eax
jmp 0x49b06d
mov dword [ebp - 0x1028], ebx
xor eax, eax
cmp word [esi + 0x8fb2], ax
setne al
mov dword [ebp - 0x1058], eax
mov ax, word [esi + 0x8f60]
cmp ax, bx
jne 0x49b0cd
mov ecx, dword [ebp - 0x1040]
mov edx, dword [ebp - 0x1024]
or dword [ebp - 0x1034], 0xffffffff
mov dword [ebp - 0x1024], ecx
mov ecx, dword [ebp - 0x1048]
mov dword [ebp - 0x1040], edx
mov edx, dword [ebp - 0x103c]
push 2
mov dword [ebp - 0x1020], ecx
mov dword [ebp - 0x103c], ecx
mov dword [ebp - 0x1048], edx
pop ecx
jmp 0x49b0e4
cmp ax, cx
je 0x49b0de
cmp ax, 3
mov dword [ebp - 0x1034], ebx
jne 0x49b0e4
mov dword [ebp - 0x1034], ecx
cmp word [esi + 0x8b18], bx
je 0x49b0ee
dec edi
cmp ax, 3
mov dword [ebp - 0x1050], edi
jne 0x49b102
cmp edi, ebx
je 0x49b472
cmp ax, cx
jne 0x49b111
mov eax, edi
cdq
idiv ecx
lea edi, [edx + eax]
jmp 0x49b120
cmp ax, 3
jne 0x49b120
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov edi, eax
lea eax, [edi + edi]
mov dword [ebp - 0x1060], eax
xor eax, eax
push eax
push eax
push eax
push dword [esi + 0x8148]
call fcn.004809d9
mov edi, dword [esi + 0x3eb8]
push edi
lea eax, [ebp - 0x1054]
push eax
lea eax, [ebp - 0x1044]
push eax
lea eax, [ebp - 0x1028]
push eax
push esi
call fcn.00486ef4
xor edx, edx
cmp word [ebp - 0x1044], dx
jne 0x49b17d
push edx
lea eax, [ebp - 0x1020]
push eax
push edi
push dword [esi + 0x8148]
push esi
call fcn.00498dbc
xor edx, edx
cmp word [ebp - 0x1028], dx
mov dword [ebp - 0x102c], edx
jle 0x49b429
cmp dword [ebp - 0x1040], edx
je 0x49b1c3
mov ecx, dword [ebp - 0x1048]
lea eax, [esi + ecx*8 + 0x3eb0]
mov ecx, dword [esi + ecx*8 + 0x3eb8]
sub ecx, dword [eax]
push ecx
push edx
push dword [eax + 4]
push dword [eax]
push dword [esi + 0x8148]
push esi
call fcn.00499285
xor edx, edx
mov ax, word [esi + 0x8f60]
cmp ax, bx
jne 0x49b1e3
mov eax, dword [ebp - 0x1050]
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x104c], eax
jmp 0x49b1fa
cmp ax, 3
jne 0x49b1ee
push 2
pop eax
jmp 0x49b1d5
mov dword [ebp - 0x1038], ebx
mov dword [ebp - 0x104c], ebx
cmp dword [ebp - 0x1060], edx
mov dword [ebp - 0x105c], edx
jle 0x49b3ac
cmp dword [ebp - 0x1058], edx
jne 0x49b266
movsx eax, word [esi + 0x8b18]
cmp eax, ebx
je 0x49b235
jle 0x49b24d
cmp eax, 3
jg 0x49b24d
mov eax, dword [ebp - 0x1050]
inc eax
mov dword [ebp - 0x1030], eax
jmp 0x49b24d
mov eax, dword [ebp - 0x104c]
mov dword [ebp - 0x1030], eax
add eax, dword [ebp - 0x1034]
mov dword [ebp - 0x104c], eax
mov ax, word [esi + 0x92bf]
mov dword [ebp - 0x1018], 5
mov dword [ebp - 0x100c], edx
jmp 0x49b29c
mov eax, dword [ebp - 0x1038]
mov dword [ebp - 0x1030], eax
add eax, dword [ebp - 0x1034]
mov dword [ebp - 0x1018], ebx
mov dword [ebp - 0x1038], eax
lea eax, [esi + 0x92bd]
cmp word [eax], dx
jne 0x49b299
mov cx, word [esi + 0x8a38]
mov word [eax], cx
mov ax, word [eax]
mov ebx, dword [ebp - 0x1030]
push edx
mov word [ebp - 0x1014], ax
lea edi, [esi + ebx*8 + 0x3eb0]
push dword [edi + 4]
push dword [edi]
push dword [esi + 0x8148]
call fcn.004809d9
lea eax, [esi + ebx*8 + 0x3eb8]
mov ebx, dword [eax]
sub ebx, dword [edi]
lea eax, [ebp - 0x1018]
push eax
push 1
lea eax, [ebp - 0x1020]
push eax
push ebx
push dword [esi + 0x8148]
push esi
call fcn.00499356
mov ax, word [ebp - 0x102c]
cmp ax, word [ebp - 0x1054]
jl 0x49b361
mov eax, dword [ebp - 0x1030]
lea eax, [esi + eax*8 + 0x3eb8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub ecx, 1
push 0
sbb eax, 0
push eax
push ecx
push dword [esi + 0x8148]
call fcn.004809d9
push 0
lea eax, [ebp - 0x1064]
push eax
push 1
lea eax, [ebp - 0x1019]
push eax
push dword [esi + 0x8148]
mov byte [ebp - 0x1019], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x1020]
xor ecx, ecx
add eax, dword [edi]
push 0
adc ecx, dword [edi + 4]
push ecx
push eax
push dword [esi + 0x8148]
call fcn.004809d9
sub ebx, dword [ebp - 0x1020]
push 0
lea eax, [ebp - 0x1020]
push eax
push ebx
push dword [esi + 0x8148]
push esi
call fcn.00498dbc
xor eax, eax
cmp dword [ebp - 0x1058], eax
sete al
inc dword [ebp - 0x105c]
xor ebx, ebx
inc ebx
xor edx, edx
mov dword [ebp - 0x1058], eax
movsx eax, word [ebp - 0x105c]
cmp eax, dword [ebp - 0x1060]
jl 0x49b20c
cmp dword [ebp - 0x1024], edx
je 0x49b3df
mov ecx, dword [ebp - 0x103c]
lea eax, [esi + ecx*8 + 0x3eb0]
mov ecx, dword [esi + ecx*8 + 0x3eb8]
sub ecx, dword [eax]
push ecx
push edx
push dword [eax + 4]
push dword [eax]
push dword [esi + 0x8148]
push esi
call fcn.00499285
xor edx, edx
cmp word [ebp - 0x1044], dx
je 0x49b40f
movsx eax, word [ebp - 0x1054]
movsx ecx, word [ebp - 0x102c]
dec eax
cmp ecx, eax
jne 0x49b40f
push dword [esi + 0x3eb8]
push dword [ebp - 0x1044]
push esi
call fcn.00486dfa
xor edx, edx
inc dword [ebp - 0x102c]
mov ax, word [ebp - 0x102c]
cmp ax, word [ebp - 0x1028]
jl 0x49b190
mov eax, dword [esi + 0x3ea8]
push edx
push dword [esi + eax*8 + 0x3ebc]
push dword [esi + eax*8 + 0x3eb8]
push dword [esi + 0x8148]
call fcn.004809d9
mov ecx, dword [esi + 0x3eb0]
push 0
lea eax, [ebp - 0x1020]
push eax
mov eax, dword [esi + 0x3ea8]
sub ecx, dword [esi + eax*8 + 0x3eb8]
push ecx
push dword [esi + 0x8148]
push esi
call fcn.00498dbc
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004a9585
leave
ret 0xc