Function at 0x100182c8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ebx
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push 0x1b
push dword [ebp + 8]
push eax
push esi
call fcn.10026824
add esp, 0x10
test eax, eax
je 0x10018315
movzx edx, byte [ebp + 0x10]
test dl, 1
je 0x10018303
mov esi, dword [ebp - 4]
movzx eax, ax
mov esp, ebp
pop ebp
ret
push 0x100b600c
push 0xfffffffffffffffb
push 2
push eax
call fcn.100149ac
add esp, 0x10
mov edx, dword [ebp - 0x10]
movzx edi, byte [ebp + 0x10]
movzx ecx, byte [ebp + 0x10]
movzx eax, byte [edx + 0x12b]
and eax, 0xffffffbf
and edi, 1
shl edi, 6
or eax, edi
mov byte [edx + 0x12b], al
mov eax, dword [ebp - 0x10]
movzx ebx, byte [eax + 0x12b]
and ebx, 0x7f
and ecx, 2
shr ecx, 1
and ecx, 1
shl ecx, 7
or ebx, ecx
mov byte [eax + 0x12b], bl
mov ebx, dword [ebp - 0x10]
movzx edx, byte [ebx + 0x12b]
test dl, 4
jne 0x1001840e
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x100186ed
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x100183b6
mov eax, 0x1a
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x100183a4
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x1a
mov esp, ebp
pop ebp
ret
mov ecx, edx
and ecx, 0x40
mov esi, 2
mov edi, 4
xor eax, eax
test ecx, ecx
setne al
test edx, 0x80
movzx edx, byte [ebx + 0x12c]
jne 0x100183e0
mov esi, 0
test dl, 1
mov edx, 0x1a
push edx
push edx
jne 0x100183f1
mov edi, 0
or eax, esi
or eax, edi
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebx + 0x129]
test al, 0x20
je 0x10018965
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov eax, edi
sub eax, 1
mov edx, ecx
sbb edx, 0
jl 0x10018460
mov eax, dword [ebx + 0xa8]
test eax, eax
je 0x1001850d
mov dword [ebp - 0x20], edi
cdq
mov dword [ebp - 0x14], edx
mov edx, edi
mov edi, dword [ebp - 0x14]
sub edx, eax
mov eax, ecx
sbb eax, edi
mov edi, dword [ebp - 0x20]
jl 0x1001850d
or edx, eax
je 0x1001850d
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x1001870c
movzx eax, byte [edx + 0x3c]
test al, 2
je 0x100184ab
mov eax, 0x19
mov dword [edx + 0x30], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x10018499
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x19
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebx + 0x12b]
movzx esi, byte [ebx + 0x12c]
mov edx, ecx
and edx, 0x40
mov edi, 2
xor eax, eax
test edx, edx
setne al
test ecx, 0x80
jne 0x100184d7
mov edi, 0
test esi, 1
mov edx, 4
jne 0x100184e9
mov edx, 0
or eax, edi
or eax, edx
mov edx, 0x19
push edx
push edx
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebx + 0x12d]
test al, 1
jne 0x10018823
mov eax, dword [ebx + 0xb4]
mov dword [ebp - 0x14], eax
xor edx, edx
add edi, 0xffffffff
adc ecx, 0xffffffff
push edx
push dword [ebx + 0xc0]
push ecx
push edi
call fcn.10090380
mov edi, dword [ebp - 0x14]
lea ebx, [ebp - 0x18]
mov dword [ebp - 0x1c], eax
xor ecx, ecx
mov dword [ebp - 0x18], edx
push ecx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x10018570
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10018570
mov eax, 0xffffffff
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
add edx, 1
add eax, 1
or edx, eax
je 0x10018745
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x90], eax
mov dword [ecx + 0x94], edx
mov ebx, dword [ebp - 0x10]
and byte [ebx + 0x12e], 0x7f
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x54]
test eax, eax
je 0x10018606
movsx edx, byte [ecx + 0x11f]
add edx, 0xfffffffb
cmp edx, 0xc
ja case.default.0x100185c7
mov edx, dword [edx*4 + 0x100bb484]
jmp edx
mov edx, dword [ecx + 0x90]
mov ecx, dword [ecx + 0x94]
mov dword [eax], edx
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x10]
jmp 0x10018606
mov edx, dword [ecx + 0x90]
mov dword [eax], edx
mov ecx, dword [ebp - 0x10]
jmp 0x10018606
mov edx, dword [ecx + 0x90]
mov word [eax], dx
mov ecx, dword [ebp - 0x10]
jmp 0x10018606
movzx edx, byte [ecx + 0x90]
mov byte [eax], dl
mov ecx, dword [ebp - 0x10]
and byte [ecx + 0x12b], 0x3f
push esi
and byte [ecx + 0x12c], 0xf7
and byte [ecx + 0x12e], 0xfe
call fcn.100260c0
pop ecx
test eax, eax
je 0x100186cc
mov edx, dword [ebp - 0x10]
mov ebx, dword [edx + 0x18]
test ebx, ebx
je 0x1001872b
movzx ecx, byte [ebx + 0x3c]
test cl, 2
je 0x1001866f
mov dword [ebx + 0x30], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebx + 0x64]
test edx, edx
je 0x10018662
xor ecx, ecx
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x64], ecx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push eax
push eax
movzx esi, byte [edx + 0x12b]
movzx edi, byte [edx + 0x12c]
mov ebx, esi
and ebx, 0x40
xor ecx, ecx
test ebx, ebx
setne cl
test esi, 0x80
mov ebx, 2
jne 0x1001869d
mov ebx, 0
test edi, 1
mov esi, 4
jne 0x100186af
mov esi, 0
or ecx, ebx
or ecx, esi
push ecx
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x30
mov esp, ebp
pop ebp
ret
push ebx
mov eax, 0x1a
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push ebx
mov eax, 0x19
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push edx
push eax
push eax
push 0
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x10]
mov dword [edx + 0xb8], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x18]
test ecx, ecx
je 0x10018804
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x100187a2
mov eax, 0x37
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x10018790
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x37
mov esp, ebp
pop ebp
ret
movzx ebx, byte [edx + 0x12b]
movzx esi, byte [edx + 0x12c]
mov ecx, ebx
and ecx, 0x40
mov edi, 2
xor eax, eax
test ecx, ecx
setne al
test ebx, 0x80
jne 0x100187ce
mov edi, 0
test esi, 1
mov ecx, 4
jne 0x100187e0
mov ecx, 0
or eax, edi
or eax, ecx
mov ecx, 0x37
push ecx
push ecx
push eax
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x37
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
push 0
push eax
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0x40]
sub edx, ecx
push edx
push ecx
push dword [ebx + 0xb4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001895b
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0xc0]
and byte [ebx + 0x12d], 0xfe
mov dword [ebx + 0x40], ecx
add ecx, edx
mov dword [ebx + 0x44], ecx
xor edi, edi
mov dword [ebx + 0xa0], edi
mov dword [ebx + 0xa4], edi
cmp eax, 0xffffffff
je 0x10018880
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
jmp 0x1001851c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xb8], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x18]
test ecx, ecx
je 0x1001893c
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x100188da
mov eax, 0x26
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x100188c8
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
movzx ebx, byte [edx + 0x12b]
movzx esi, byte [edx + 0x12c]
mov ecx, ebx
and ecx, 0x40
mov edi, 2
xor eax, eax
test ecx, ecx
setne al
test ebx, 0x80
jne 0x10018906
mov edi, 0
test esi, 1
mov ecx, 4
jne 0x10018918
mov ecx, 0
or eax, edi
or eax, ecx
mov ecx, 0x26
push ecx
push ecx
push eax
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x26
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffff
jmp 0x10018847
movzx eax, byte [ebp + 0x10]
movzx edi, byte [ebp + 0x12]
movzx edx, byte [ebx + 0x128]
and edx, 0xfffffffe
and eax, 0xffffff80
shr eax, 7
and eax, 1
or edx, eax
mov byte [ebx + 0x128], dl
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax + 0x128]
and ecx, 0xfffffffd
and edi, 4
shr edi, 2
and edi, 1
add edi, edi
or ecx, edi
mov byte [eax + 0x128], cl
mov ecx, dword [ebp - 0x10]
movzx eax, byte [ebp + 0x13]
movzx ebx, byte [ecx + 0x128]
and eax, 8
shr eax, 3
and eax, 1
and ebx, 0xfffffffb
mov edx, eax
shl edx, 2
or ebx, edx
movzx edx, byte [ebp + 0x13]
mov byte [ecx + 0x128], bl
test edx, 0x80
je 0x100189e5
lea edx, [ebp + 0x1f]
and edx, 0xfffffffc
mov edx, dword [edx]
jmp 0x100189e7
xor edx, edx
mov edi, dword [ebp - 0x10]
movzx ebx, byte [ebp + 0x13]
movzx ecx, byte [edi + 0x128]
and ecx, 0xfffffff7
and ebx, 4
shr ebx, 2
and ebx, 1
shl ebx, 3
or ecx, ebx
mov byte [edi + 0x128], cl
mov ebx, eax
shl ebx, 5
mov edi, dword [ebp - 0x10]
movzx ecx, byte [edi + 0x128]
and ecx, 0xffffffdf
or ecx, ebx
movzx ebx, byte [ebp + 0x13]
mov byte [edi + 0x128], cl
mov edi, dword [ebp - 0x10]
movzx ecx, byte [edi + 0x131]
and ecx, 0xfffffffe
and ebx, 0x10
shr ebx, 4
and ebx, 1
or ecx, ebx
mov byte [edi + 0x131], cl
mov ebx, dword [ebp - 0x10]
movzx ecx, byte [ebx + 0x131]
and ecx, 0xfffffffd
movzx edi, byte [ebp + 0x13]
add eax, eax
or ecx, eax
mov byte [ebx + 0x131], cl
and edi, 0x20
shr edi, 5
mov ebx, dword [ebp - 0x10]
movzx eax, byte [ebx + 0x128]
and edi, 1
and eax, 0xffffffbf
mov ecx, edi
shl ecx, 6
or eax, ecx
mov byte [ebx + 0x128], al
mov eax, dword [ebp - 0x10]
movzx ebx, byte [eax + 0x128]
and ebx, 0x7f
shl edi, 7
or ebx, edi
movzx edi, byte [ebp + 0x12]
mov byte [eax + 0x128], bl
mov ebx, dword [ebp - 0x10]
movzx ecx, byte [ebx + 0x129]
and ecx, 0xfffffffe
mov eax, edx
and eax, 1
or ecx, eax
mov byte [ebx + 0x129], cl
mov ecx, edx
and ecx, 2
mov ebx, dword [ebp - 0x10]
movzx eax, byte [ebx + 0x131]
and eax, 0xfffffff7
shr ecx, 1
and ecx, 1
shl ecx, 3
or eax, ecx
mov byte [ebx + 0x131], al
mov ecx, dword [ebp - 0x10]
movzx eax, byte [ecx + 0x129]
and eax, 0xfffffff9
and edx, 0xc
shr edx, 2
and edx, 3
add edx, edx
or eax, edx
mov byte [ecx + 0x129], al
and edi, 1
movsx eax, byte [ebp + 0x11]
mov ebx, dword [ebp - 0x10]
movzx edx, byte [ebx + 0x12d]
and edx, 0xfffffff7
mov ecx, edi
and ecx, 1
shl ecx, 3
or edx, ecx
mov byte [ebx + 0x12d], dl
test edi, edi
jne 0x10018b2f
test eax, eax
je 0x10018b42
cmp eax, 0xffffffff
je 0x10018b42
mov edx, dword [ebp - 0x10]
or byte [edx + 0x12d], 4
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 0x120], al
mov eax, 2
push eax
push 4
push eax
push dword [ebp - 0x10]
call fcn.1002b098
add esp, 0x10
test eax, eax
je 0x10018c00
mov edx, dword [ebp - 0x10]
mov ebx, dword [edx + 0x18]
test ebx, ebx
je 0x10018c08
movzx ecx, byte [ebx + 0x3c]
test cl, 2
je 0x10018ba3
mov dword [ebx + 0x30], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebx + 0x64]
test edx, edx
je 0x10018b96
xor ecx, ecx
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x64], ecx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push eax
push eax
movzx esi, byte [edx + 0x12b]
movzx edi, byte [edx + 0x12c]
mov ebx, esi
and ebx, 0x40
xor ecx, ecx
test ebx, ebx
setne cl
test esi, 0x80
mov ebx, 2
jne 0x10018bd1
mov ebx, 0
test edi, 1
mov esi, 4
jne 0x10018be3
mov esi, 0
or ecx, ebx
or ecx, esi
push ecx
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x10]
jmp 0x1001841d
push edx
push eax
push eax
push 2
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret