Function at 0x4145a2
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb4
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [edi + 0xa8]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov bl, byte [esi + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
je 0x4145dd
mov eax, 0x80004004
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea esi, [edi + 0x4c]
mov eax, dword [esi]
xor ebx, ebx
mov dword [esp + 0x84], esi
cmp eax, ebx
je 0x4145f7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esi], ebx
lea esi, [esp + 0x44]
call fcn.004095be
lea edx, [esp + 0x50]
push edx
xor eax, eax
push 3
push dword [ebp + 0xc]
mov word [esp + 0x5c], ax
mov word [esp + 0x5e], ax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x64], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
cmp eax, ebx
je 0x414640
mov esi, eax
lea eax, [esp + 0x50]
call fcn.0040c2b1
push dword [esp + 0x44]
call sub.MSVCR90.dll_free
pop ecx
mov eax, esi
jmp 0x4145d4
cmp word [esp + 0x50], bx
jne 0x414655
lea ebx, [edi + 0x50]
lea esi, [esp + 0x44]
call fcn.004096c4
jmp 0x414671
cmp word [esp + 0x50], 8
je 0x414664
mov esi, 0x80004005
jmp 0x414629
push dword [esp + 0x58]
lea esi, [esp + 0x48]
call fcn.0040976b
lea esi, [edi + 0x1c]
lea ebx, [esp + 0x44]
call fcn.004096c4
lea eax, [esp + 0x50]
call fcn.0040c2b1
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
jne 0x4149ef
lea edx, [esp + 0x18]
push edx
xor eax, eax
push 9
push dword [ebp + 0xc]
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x2c], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov esi, eax
cmp esi, ebx
je 0x4146c3
lea eax, [esp + 0x18]
jmp 0x41462d
cmp word [esp + 0x18], bx
jne 0x4146cf
mov eax, dword [edi + 0x64]
jmp 0x4146ee
cmp word [esp + 0x18], 0x13
je 0x4146ea
lea eax, [esp + 0x18]
call fcn.0040c2b1
mov esi, 0x80004005
jmp 0x414632
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x18]
push edx
push 6
push dword [ebp + 0xc]
mov dword [edi + 0x44], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov esi, eax
cmp esi, ebx
jne 0x4146ba
cmp word [esp + 0x20], bx
lea edx, [esp + 0x70]
setne al
push edx
mov byte [edi + 0x40], al
xor eax, eax
push 0x15
push dword [ebp + 0xc]
mov word [esp + 0x7c], ax
mov word [esp + 0x7e], ax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x84], ebx
mov ecx, dword [eax]
push eax
mov byte [esp + 0x23], bl
call dword [ecx + 0x18]
mov esi, eax
cmp esi, ebx
je 0x414753
lea eax, [esp + 0x70]
call fcn.0040c2b1
jmp 0x4146ba
cmp word [esp + 0x70], 0xb
jne 0x414765
cmp word [esp + 0x78], bx
setne byte [esp + 0x13]
lea eax, [esp + 0x70]
call fcn.0040c2b1
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0xc
push dword [ebp + 0xc]
push eax
call dword [ecx + 0x18]
mov esi, eax
cmp esi, ebx
jne 0x4146ba
movzx eax, word [esp + 0x18]
cmp eax, ebx
je 0x4147ac
cmp eax, 0x40
jne 0x4146d7
mov ecx, dword [esp + 0x20]
lea eax, [edi + 0x38]
mov dword [eax], ecx
mov ecx, dword [esp + 0x24]
jmp 0x4147b7
mov ecx, dword [edi + 0x5c]
lea eax, [edi + 0x38]
mov dword [eax], ecx
mov ecx, dword [edi + 0x60]
mov dword [eax + 4], ecx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call fcn.0040a26e
mov esi, dword [esp + 0x30]
cmp esi, ebx
jne 0x4147ef
lea ebx, [esp + 0x2c]
call fcn.00408eff
jmp 0x4146d7
lea ebx, [esp + 0x44]
lea eax, [esp + 0x64]
call fcn.00409643
xor ebx, ebx
cmp byte [edi + 0x40], bl
jne 0x414822
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + esi*4 - 4]
cmp esi, ebx
je 0x41481e
push dword [esi]
call sub.MSVCR90.dll_free
push esi
call sub.MSVCR90.dll_free
pop ecx
pop ecx
dec dword [esp + 0x30]
cmp dword [esp + 0x30], ebx
je 0x41483a
cmp byte [esp + 0x13], bl
jne 0x41483a
lea eax, [esp + 0x2c]
push eax
mov ecx, edi
call fcn.0041453e
lea eax, [esp + 0x38]
push eax
lea ecx, [edi + 0x10]
lea eax, [esp + 0x68]
call fcn.00409561
cmp byte [edi + 0x40], bl
je 0x4148a4
lea esi, [edi + 0x28]
lea ebx, [esp + 0x38]
call fcn.004096c4
cmp byte [esp + 0x13], 0
je 0x41486c
mov eax, dword [esi]
call fcn.0040a5fb
jmp 0x414877
push dword [esp + 0x14]
push dword [esi]
call fcn.0040a551
push dword [esp + 0x38]
call sub.MSVCR90.dll_free
push dword [esp + 0x68]
call sub.MSVCR90.dll_free
pop ecx
pop ecx
lea ebx, [esp + 0x2c]
call fcn.00408eff
lea eax, [esp + 0x18]
call fcn.0040c2b1
xor esi, esi
jmp 0x414632
lea eax, [esp + 0x88]
call fcn.0040b214
lea esi, [esp + 0xb0]
call fcn.004095be
push dword [esp + 0x38]
lea ecx, [esp + 0x8c]
call fcn.0040b27c
test al, al
je 0x414913
mov eax, dword [esp + 0x38]
call fcn.0040a8b1
test al, al
jne 0x414913
add edi, 0xe4
mov ebx, str.Can_not_delete_output_file
call fcn.004097c0
push dword [esp + 0xb0]
call sub.MSVCR90.dll_free
push dword [esp + 0x3c]
call sub.MSVCR90.dll_free
push dword [esp + 0x6c]
call sub.MSVCR90.dll_free
add esp, 0xc
jmp 0x4147e1
cmp byte [esp + 0x13], bl
jne 0x4149a9
push 0x18
call fcn.00409b11
pop ecx
cmp eax, ebx
je 0x41493e
mov dword [eax + 4], ebx
mov esi, eax
mov dword [eax], vtable.COutFileStream.0
or dword [eax + 8], 0xffffffff
mov dword [esp + 0x14], esi
jmp 0x414944
mov dword [esp + 0x14], ebx
mov esi, ebx
mov dword [edi + 0x48], esi
cmp esi, ebx
je 0x414951
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [edi + 0x48]
push 1
push dword [esp + 0x3c]
lea ecx, [eax + 8]
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], ebx
call fcn.0040b9d1
test al, al
jne 0x41498f
add edi, 0xe4
mov ebx, str.Can_not_open_output_file
call fcn.004097c0
test esi, esi
je 0x4148ed
mov eax, dword [esi]
push esi
call dword [eax + 8]
jmp 0x4148ed
mov edi, esi
mov esi, dword [esp + 0x84]
call fcn.00403109
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x14]
mov edi, dword [ebp + 8]
mov dword [eax], ecx
lea esi, [edi + 0x28]
lea ebx, [esp + 0x38]
call fcn.004096c4
push dword [esp + 0xb0]
call sub.MSVCR90.dll_free
push dword [esp + 0x3c]
call sub.MSVCR90.dll_free
push dword [esp + 0x6c]
call sub.MSVCR90.dll_free
add esp, 0xc
lea ebx, [esp + 0x2c]
call fcn.00408eff
lea eax, [esp + 0x18]
call fcn.0040c2b1
xor ebx, ebx
jmp 0x41489d
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
jmp 0x41489d