Function at 0x40b821
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001b2c1
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x100241c0]
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 + 0x10]
xor ebx, ebx
push ebx
mov esi, ecx
mov edi, edx
push 0x1001e7a8
lea ecx, [ebp - 0x12c]
mov dword [ebp - 0x150], edi
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], ebx
mov byte [ebp - 0x12c], bl
call fcn.00407a71
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x40bb12
cmp dword [ebp + 8], 1
jl 0x40bb12
push ebx
push 0x1001e7a8
lea ecx, [ebp - 0x110]
mov dword [ebp - 0xfc], 0xf
mov dword [ebp - 0x100], ebx
mov byte [ebp - 0x110], bl
call fcn.00407a71
push 0x80
lea ecx, [ebp - 0xf4]
push ebx
push ecx
mov byte [ebp - 4], 1
call fcn.0041a6a1
add esp, 0xc
call dword [0x1001c044]
push eax
lea edx, [ebp - 0xf4]
push 0x1001e9d4
push edx
call fcn.00414f0d
lea eax, [ebp - 0xf4]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40b911
sub eax, edx
push eax
lea eax, [ebp - 0xf4]
lea ecx, [ebp - 0x110]
call fcn.0040e0e1
push 4
mov eax, 0x1001e9d8
lea ecx, [ebp - 0x110]
call fcn.0040e0e1
cmp dword [ebp - 0xfc], 0x10
mov eax, dword [ebp - 0x110]
jae 0x40b953
lea eax, [ebp - 0x110]
push 0x1001e9e0
push eax
call fcn.004152e3
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x40bab0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x150]
push edi
push 1
push eax
push ecx
call fcn.00414b93
push edi
call fcn.00414ccb
mov eax, dword [ebp - 0x110]
add esp, 0x14
cmp dword [ebp - 0xfc], 0x10
jae 0x40b99c
lea eax, [ebp - 0x110]
mov edx, dword [ebp + 0xc]
push edx
push eax
call fcn.004099c1
mov edi, eax
mov eax, dword [ebp - 0x14c]
mov dword [eax], edi
cmp edi, ebx
jge 0x40ba3e
push 0x63
lea ecx, [ebp - 0x73]
push ebx
push ecx
mov byte [ebp - 0x74], bl
call fcn.0041a6a1
push edi
lea edx, [ebp - 0x74]
push 0x1001e898
push edx
call fcn.00414f0d
mov eax, dword [ebp - 0x110]
mov edi, 0x10
add esp, 0x18
cmp dword [ebp - 0xfc], edi
jae 0x40b9f2
lea eax, [ebp - 0x110]
push eax
call dword [0x1001c154]
test eax, eax
je 0x40ba18
mov eax, dword [ebp - 0x110]
cmp dword [ebp - 0xfc], edi
jae 0x40ba11
lea eax, [ebp - 0x110]
push eax
call dword [0x1001c034]
lea eax, [ebp - 0x74]
push eax
mov ecx, esi
call fcn.00407a31
lea ecx, [ebp - 0x110]
call fcn.004065d1
lea ecx, [ebp - 0x12c]
call fcn.004065d1
jmp 0x40bb4b
push edi
lea ecx, [ebp - 0x148]
call fcn.0040a1f1
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x110]
mov edi, 0x10
cmp dword [ebp - 0xfc], edi
jae 0x40ba67
lea eax, [ebp - 0x110]
push eax
call dword [0x1001c154]
test eax, eax
je 0x40ba8d
mov eax, dword [ebp - 0x110]
cmp dword [ebp - 0xfc], edi
jae 0x40ba86
lea eax, [ebp - 0x110]
push eax
call dword [0x1001c034]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
lea edi, [ebp - 0x148]
mov byte [esi], bl
call fcn.00406691
mov ecx, edi
call fcn.004065d1
jmp 0x40ba23
push 5
mov edi, 0xf
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
push 0x1001e9e4
mov ecx, esi
mov byte [esi], bl
call fcn.00407a71
mov eax, dword [ebp - 0xfc]
cmp eax, 0x10
jb 0x40baea
mov ecx, dword [ebp - 0x110]
inc eax
push eax
push ecx
lea ecx, [ebp - 0xf8]
call fcn.004069c1
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0xfc], edi
mov dword [ebp - 0x100], ebx
mov byte [ebp - 0x110], bl
cmp eax, 0x10
jb 0x40bb4b
mov edx, dword [ebp - 0x12c]
inc eax
push eax
push edx
jmp 0x40bb40
push 5
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
push 0x1001e9cc
mov ecx, esi
mov byte [esi], bl
call fcn.00407a71
mov eax, dword [ebp - 0x118]
cmp eax, 0x10
jb 0x40bb4b
inc eax
push eax
mov eax, dword [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x114]
call fcn.004069c1
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.0041455d
mov esp, ebp
pop ebp
ret 0xc