Function at 0x1001f4be
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
xor eax, eax
mov dword [ebp - 4], edx
push edi
mov edi, ecx
mov dword [ebp - 8], eax
xor esi, esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
test edi, edi
je 0x1001f5fe
mov eax, dword [edi + 0x2c]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], ebx
test eax, eax
je 0x1001f10d
push 1
push esi
push ebx
push edx
push 3
push edi
call eax
mov esi, eax
add esp, 0x18
test esi, esi
jle 0x1001f600
mov edx, dword [ebp - 4]
mov eax, dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
nop dword [eax + eax]
test esi, esi
js 0x1001f5b8
mov eax, dword [edi + 4]
test eax, eax
je 0x1001f146
mov eax, dword [eax + 0x104]
test eax, eax
je 0x1001f146
push ebx
push edx
push edi
call eax
add esp, 0xc
jmp 0x1001f4c8
mov cl, byte [edi + 0x50]
movzx eax, cl
add eax, 0xfffffffe
cmp eax, 6
ja case.default.0x1001f158
jmp dword [eax*4 + 0x1001f608]
mov dword [ebp - 8], 0
test edx, edx
je 0x1001f249
test byte [edi + 0x4c], 1
lea eax, [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, ebx
je 0x1001f19b
push 2
push eax
push 0
call fcn.1005ce30
add esp, 0xc
cmp eax, 0xffffff36
je 0x1001f19f
mov edx, dword [ebp - 4]
or ecx, 0xffffffff
jmp 0x1001f24e
push 0
jmp 0x1001f17e
mov eax, dword [ebp - 8]
test eax, eax
jne 0x1001f1b3
mov edx, dword [ebp - 4]
xor ecx, ecx
mov dword [ebp - 0x20], eax
jmp 0x1001f24e
mov ecx, dword [0x100df564]
push eax
test ecx, ecx
je 0x1001f1c2
call ecx
jmp 0x1001f1c7
call fcn.10080ffe
mov esi, eax
add esp, 4
test esi, esi
je 0x1001f190
test byte [edi + 0x4c], 1
lea eax, [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, ebx
je 0x1001f215
push 2
push eax
push esi
call fcn.1005ce30
add esp, 0xc
test eax, eax
jns 0x1001f219
mov eax, dword [0x100df55c]
push esi
test eax, eax
je 0x1001f205
call eax
mov edx, dword [ebp - 4]
add esp, 4
or ecx, 0xffffffff
jmp 0x1001f24e
call fcn.1008107c
mov edx, dword [ebp - 4]
add esp, 4
or ecx, 0xffffffff
jmp 0x1001f24e
push 0
jmp 0x1001f1e0
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x1001f236
mov eax, dword [0x100df55c]
push ecx
test eax, eax
je 0x1001f22e
call eax
jmp 0x1001f233
call fcn.1008107c
add esp, 4
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x20], ecx
mov ecx, ebx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 8], ebx
jmp 0x1001f251
mov ecx, 0xffffff53
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0x20]
test ecx, ecx
mov esi, ecx
cmovle eax, ebx
mov ebx, eax
mov eax, dword [ebp - 0x1c]
cmovle eax, edx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], eax
jmp case.default.0x1001f158
test edx, edx
je 0x1001f33d
mov esi, 0xfffffffe
cmp cl, 5
je 0x1001f287
xor esi, esi
jmp case.default.0x1001f158
cmp dword [edi + 0x10], 0
je 0x1001f323
mov eax, dword [edi + 0x38]
test ebx, ebx
jne 0x1001f2a7
mov ecx, dword [edi + 0x18]
add ecx, eax
xor esi, esi
mov dword [ebp - 0x24], ecx
jmp case.default.0x1001f158
mov ecx, dword [edi + 0x3c]
cmp eax, ecx
jge 0x1001f2ba
mov esi, ecx
sub esi, eax
mov dword [ebp - 0x10], esi
mov esi, dword [edi + 0x30]
jmp 0x1001f2f2
test ecx, ecx
jle 0x1001f2ca
cmp eax, ecx
jne 0x1001f2ca
or esi, 0xffffffff
jmp case.default.0x1001f158
mov esi, dword [edi + 0x30]
mov dword [ebp - 0xc], esi
sub esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
jg 0x1001f2f5
test ecx, ecx
jne 0x1001f2e5
or esi, 0xffffffff
jmp case.default.0x1001f158
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x10], ecx
jg 0x1001f2f0
mov dword [ebp - 0x10], esi
xor eax, eax
mov dword [ebp - 0xc], esi
cmp ebx, dword [ebp - 0x10]
mov esi, ebx
mov ebx, dword [edi + 0x18]
cmovge esi, dword [ebp - 0x10]
add ebx, eax
add eax, esi
mov dword [ebp - 0x24], ebx
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x10], esi
mov dword [edi + 0x38], eax
cmp eax, dword [ebp - 0xc]
jne 0x1001f323
mov eax, esi
test ecx, ecx
jle 0x1001f323
mov dword [edi + 0x38], 0
test esi, esi
jle case.default.0x1001f158
push esi
push edx
push dword [ebp - 0x24]
call fcn.1007e990
add esp, 0xc
jmp case.default.0x1001f158
mov esi, 0xffffff53
jmp case.default.0x1001f158
mov esi, dword [edi]
test esi, esi
je 0x1001f35a
test edx, edx
je 0x1001f35a
test dword [edi + 0x4c], 0x200
je 0x1001f361
xor esi, esi
jmp case.default.0x1001f158
test ebx, ebx
jne 0x1001f36d
lea esi, [ebx + 1]
jmp case.default.0x1001f158
mov eax, dword [edi + 0x30]
add eax, ebx
mov dword [ebp - 0xc], eax
js 0x1001f35a
cmp dword [esi + 4], eax
ja 0x1001f3c4
cmp dword [esi + 8], eax
jae 0x1001f3c4
lea ecx, [eax + 3]
mov eax, 0x55555556
imul ecx
mov ecx, dword [esi]
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x100df560]
shl eax, 2
mov dword [ebp - 0x10], eax
push eax
push ecx
test edx, edx
je 0x1001f3aa
call edx
jmp 0x1001f3af
call fcn.10095ec5
add esp, 8
test eax, eax
je 0x1001f35a
mov edx, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 4], eax
test eax, eax
je 0x1001f35a
mov eax, dword [edi]
mov ecx, dword [eax]
test ecx, ecx
jne 0x1001f3da
xor esi, esi
jmp case.default.0x1001f158
mov eax, dword [edi + 0x30]
push ebx
push edx
add eax, ecx
push eax
call fcn.1007e990
mov ecx, dword [edi]
add esp, 0xc
mov esi, ebx
mov eax, dword [ecx]
mov dword [edi + 0x18], eax
mov eax, dword [ecx + 8]
add dword [edi + 0x30], ebx
add dword [edi + 0x38], ebx
mov dword [edi + 0x44], eax
jmp case.default.0x1001f158
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001f41d
push eax
push ebx
push 1
push edx
call fcn.10095a83
add esp, 0x10
jmp 0x1001f4c8
mov esi, 0xffffff52
jmp case.default.0x1001f158
cmp dword [edi + 0xc], 0
je case.default.0x1001f158
xor esi, esi
test edx, edx
je 0x1001f33d
mov ecx, dword [edi + 0x18]
test ecx, ecx
je 0x1001f4a8
cmp dword [ecx + 0x230], esi
je 0x1001f45f
push ebx
call fcn.1003b760
add esp, 4
neg eax
sbb esi, esi
inc esi
dec esi
neg esi
sbb esi, esi
jmp case.default.0x1001f158
mov eax, 0x100a32b8
cmp dword [0x100a32c0], esi
je 0x1001f481
mov ecx, dword [ecx + 0x228]
cmp ecx, dword [eax]
je 0x1001f4a0
add eax, 0xc
cmp dword [eax + 8], esi
jne 0x1001f472
mov ecx, dword [edi + 0x18]
mov eax, dword [ecx + 0x228]
cmp eax, 0x357
jne 0x1001f4a8
push ebx
call fcn.100185c0
mov esi, eax
add esp, 4
dec esi
neg esi
sbb esi, esi
jmp case.default.0x1001f158
mov eax, dword [eax + 4]
mov ecx, dword [edi + 0x18]
jmp 0x1001f487
push ebx
call fcn.100185c0
add esp, 4
cmp eax, 1
mov eax, 0xffffffff
cmovne esi, eax
jmp case.default.0x1001f158
push 0
push ebx
push edx
push dword [edi + 0x44]
call dword [ebp - 0x28]
mov esi, eax
mov edi, dword [edi + 0xc]
test edi, edi
je 0x1001f5b8
mov edx, dword [ebp - 4]
jmp 0x1001f120
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x48], 0
je 0x1001f4ee
or esi, 0xffffffff
jmp 0x1001f5b8
mov ebx, dword [edi + 0x18]
test ebx, ebx
jne 0x1001f4ff
mov esi, 0xffffff53
jmp 0x1001f5b5
and dword [edi + 0x4c], 0xffffffef
test edx, edx
je 0x1001f566
mov esi, dword [ebp - 0x14]
test esi, esi
js 0x1001f566
mov eax, dword [ebx + 0x428]
test eax, eax
je 0x1001f52f
push 1
push 8
push ebx
call eax
mov edx, dword [ebp - 4]
add esp, 0xc
mov dword [ebx + 0x42c], 8
push esi
mov ecx, ebx
call fcn.10030560
mov esi, eax
add esp, 4
test esi, esi
jns 0x1001f558
mov ebx, dword [edi + 0x18]
or esi, 0xffffffff
test ebx, ebx
jne 0x1001f56b
mov eax, dword [ebp - 0x18]
or esi, esi
mov dword [eax + 0x48], 1
jmp 0x1001f5b5
jne 0x1001f5b5
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x48], 1
jmp 0x1001f5b5
mov esi, 0xffffff53
mov eax, dword [ebx + 0x1e0]
cmp eax, 0xfffffebd
je 0x1001f5b1
cmp eax, 0xfffffeb9
je 0x1001f5b1
cmp eax, 0xfffffea9
je 0x1001f5a5
mov ecx, 0x2000
test word [ebx + 0x3de], cx
jne 0x1001f5a5
cmp eax, 0xfffffe73
je 0x1001f5a5
cmp eax, 2
je 0x1001f5b1
cmp eax, 3
je 0x1001f5b1
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x48], 1
jmp 0x1001f5b5
or dword [edi + 0x4c], 0x10
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x1001f5d6
push esi
push 0
push ebx
push dword [ebp - 4]
push 0x83
push edx
call eax
add esp, 0x18
mov esi, eax
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x1001f5f3
mov eax, dword [0x100df55c]
push ecx
test eax, eax
je 0x1001f5eb
call eax
jmp 0x1001f5f0
call fcn.1008107c
add esp, 4
mov eax, dword [ebp - 8]
test eax, eax
jle 0x1001f5fe
test esi, esi
jg 0x1001f600
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret